iceberg-cpp
Loading...
Searching...
No Matches
Public Member Functions | List of all members
iceberg::SeekableInputStream Class Referenceabstract

Seekable byte stream for reading file contents. More...

#include <file_io.h>

Inheritance diagram for iceberg::SeekableInputStream:
iceberg::test::StdSeekableInputStream

Public Member Functions

virtual Result< int64_t > Position () const =0
 Return the current read position.
 
virtual Status Seek (int64_t position)=0
 Seek to an absolute byte position.
 
virtual Result< int64_t > Read (std::span< std::byte > out)=0
 Read up to out.size() bytes from the current position.
 
virtual Status ReadFully (int64_t position, std::span< std::byte > out)=0
 Read exactly out.size() bytes from an absolute position.
 
virtual Status Close ()=0
 Close the stream. Implementations should allow repeated Close calls.
 

Detailed Description

Seekable byte stream for reading file contents.

Member Function Documentation

◆ Close()

virtual Status iceberg::SeekableInputStream::Close ( )
pure virtual

Close the stream. Implementations should allow repeated Close calls.

Implemented in iceberg::test::StdSeekableInputStream.

◆ Position()

virtual Result< int64_t > iceberg::SeekableInputStream::Position ( ) const
pure virtual

Return the current read position.

Implemented in iceberg::test::StdSeekableInputStream.

◆ Read()

virtual Result< int64_t > iceberg::SeekableInputStream::Read ( std::span< std::byte >  out)
pure virtual

Read up to out.size() bytes from the current position.

Implemented in iceberg::test::StdSeekableInputStream.

◆ ReadFully()

virtual Status iceberg::SeekableInputStream::ReadFully ( int64_t  position,
std::span< std::byte >  out 
)
pure virtual

Read exactly out.size() bytes from an absolute position.

Fails if fewer than out.size() bytes are available. The current stream position after this call is unspecified; callers should Seek before subsequent position-dependent reads.

Implemented in iceberg::test::StdSeekableInputStream.

◆ Seek()

virtual Status iceberg::SeekableInputStream::Seek ( int64_t  position)
pure virtual

Seek to an absolute byte position.

Implemented in iceberg::test::StdSeekableInputStream.


The documentation for this class was generated from the following file: