asByteStream

fun File.asByteStream(start: Long = 0, endInclusive: Long = length() - 1): ByteStream

Create a ByteStream from a file


Create a ByteStream from a file with the given range


fun Path.asByteStream(start: Long = 0, endInclusive: Long = -1): ByteStream

Create a ByteStream from a path


Create a ByteStream from a path with the given range


Create a ByteStream.SourceStream that reads from this InputStream

Parameters

contentLength

If specified, indicates how many bytes remain in this stream. Defaults to null.