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