InputFileStream(- String path,
- {int byteOrder = LITTLE_ENDIAN,
- int bufferSize = kDefaultBufferSize}
)
Implementation
InputFileStream(this.path,
{this.byteOrder = LITTLE_ENDIAN, int bufferSize = kDefaultBufferSize})
: _file = FileHandle(path) {
_fileSize = _file.length;
// Don't have a buffer bigger than the file itself.
// Also, make sure it's at least 8 bytes, so reading a 64-bit value doesn't
// have to deal with buffer overflow.
bufferSize = max(min(bufferSize, _fileSize), 8);
_buffer = Uint8List(min(bufferSize, 8));
_readBuffer();
}