98 virtual void write (
Int64 size,
const void* buf) = 0;
132 virtual void flush();
136 virtual void fsync();
185 return doSeek (offset, option);
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
read/write; file may not exist yet.
virtual Bool isSeekable() const =0
Is the byte stream seekable?
ByteIO()
The constructor does nothing.
virtual Int64 length()=0
Get the length of the byte stream.
SeekOption
Define the possible seek options.
virtual Bool isReadable() const =0
Is the byte stream readable?
read/write; delete file at close.
virtual String fileName() const
Get the file name of the file attached.
read/write; file must exist; delete at close.
ByteIO & operator=(const ByteIO &byteIO)
virtual void write(Int64 size, const void *buf)=0
Write size bytes to the byte stream.
virtual Bool isWritable() const =0
Is the byte stream writable?
virtual void reopenRW()
Reopen the underlying IO stream for read/write access.
Abstract base class for IO on a byte stream.
Int64 seek(Int offset, ByteIO::SeekOption=ByteIO::Begin)
This function sets the position on the given offset.
Seek from current position.
bool Bool
Define the standard types used by Casacore.
read/write; create file if not exist.
Seek from beginning of file.
Seek from the end of the file.
read/write; file must exist.
virtual Int64 doSeek(Int64 offset, ByteIO::SeekOption)=0
read/write; create file if not exist.
OpenOption
Define the possible ByteIO open options.
virtual void flush()
Flush the data to the file.
virtual Int64 read(Int64 size, void *buf, Bool throwException=True)=0
Read size bytes from the byte stream.
String: the storage and methods of handling collections of characters.
virtual void fsync()
Fsync the file (i.e.
virtual Int64 pread(Int64 size, Int64 offset, void *buf, Bool throwException=True)
Like read but reads from offset of start of the file The file offset is not changed.
virtual void resync()
Resync the file (i.e.
virtual void pwrite(Int64 size, Int64 offset, const void *buf)
Write size bytes to the byte stream at offset.