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