File Readable Stream
class FileReadableStream @JvmOverloads constructor(file: File, dispatcher: CoroutineDispatcher = Dispatchers.IO) : ReadableStream
Constructors
Properties
Functions
Link copied to clipboard
Clearing memory and closing handles. After calling this method, all other methods will return ReadableStreamHasClosedException.
Link copied to clipboard
Returns the number of bytes in the stream. If length is unknown, UInt.MAX_VALUE will be returned.
Link copied to clipboard
Reads and returns a byte from the stream, indented by currentOffset.
Link copied to clipboard
Returns all data in one byte array and closes itself.
Link copied to clipboard
Reads and returns up to blockSize next bytes from the stream or an empty array if stream has ran out. Result array could has less size if there is less data remains in the stream.