asRamFile static method

Future<InputFileStream> asRamFile(
  1. Stream<Uint8List> stream,
  2. int fileLength, {
  3. int byteOrder = LITTLE_ENDIAN,
  4. int bufferSize = FileBuffer.kDefaultBufferSize,
})

Implementation

static Future<InputFileStream> asRamFile(
  Stream<Uint8List> stream,
  int fileLength, {
  int byteOrder = LITTLE_ENDIAN,
  int bufferSize = FileBuffer.kDefaultBufferSize,
}) async {
  return InputFileStream.withFileBuffer(
    FileBuffer(await RamFileHandle.fromStream(stream, fileLength)),
    byteOrder: byteOrder,
    bufferSize: bufferSize,
  );
}