Movatterモバイル変換


[0]ホーム

URL:


Skip to contents

InputStream classes

Source:R/io.R
InputStream.Rd

RandomAccessFile inherits fromInputStream and is a baseclass for:ReadableFile for reading from a file;MemoryMappedFile forthe same but with memory mapping; andBufferReader for reading from abuffer. Use these with the various table readers.

Factory

The$create() factory methods instantiate theInputStream object andtake the following arguments, depending on the subclass:

  • path ForReadableFile, a character file name

  • x ForBufferReader, aBuffer or an object that can bemade into a buffer viabuffer().

To instantiate aMemoryMappedFile, callmmap_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 specifiednbytes orall, ifnbytes is not provided

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

  • $Resize(size): for aMemoryMappedFile that is writeable


[8]ページ先頭

©2009-2026 Movatter.jp