Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

InputStream

InputStream classes


Description

RandomAccessFile inherits from InputStream and is a base class for: ReadableFile for reading from a file; MemoryMappedFile for the same but with memory mapping; and BufferReader for reading from a buffer. Use these with the various table readers.

Factory

The $create() factory methods instantiate the InputStream object and take the following arguments, depending on the subclass:

  • path For ReadableFile, a character file name

  • x For BufferReader, a Buffer or an object that can be made into a buffer via buffer().

To instantiate a MemoryMappedFile, call mmap_open().

Methods

  • $GetSize():

  • $supports_zero_copy(): Logical

  • $seek(position): go to that position in the stream

  • $tell(): return the position in the stream

  • $close(): close the stream

  • $Read(nbytes): read data from the stream, either a specified nbytes or all, if nbytes is not provided

  • $ReadAt(position, nbytes): similar to $seek(position)$Read(nbytes)

  • $Resize(size): for a MemoryMappedFile that is writeable


arrow

Integration to 'Apache' 'Arrow'

v4.0.0.1
Apache License (>= 2.0)
Authors
Neal Richardson [aut, cre], Ian Cook [aut], Jonathan Keane [aut], Romain François [aut] (<https://orcid.org/0000-0002-2444-4226>), Jeroen Ooms [aut], Javier Luraschi [ctb], Jeffrey Wong [ctb], Apache Arrow [aut, cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.