28 #ifndef CASA_FILEBUFIO_H
29 #define CASA_FILEBUFIO_H
126 virtual void flush();
173 Bool throwException);
virtual Bool isReadable() const
Is the IO stream readable?
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
void attach(int fd, uInt bufferSize=16384)
Attach to the given file descriptor.
virtual void flush()
Flush the current buffer.
Class for buffered IO on a file.
Int64 readBlock(Int64 size, char *buf, Bool throwException)
Read a block from the stream at the current offset.
void fillSeekable()
Determine if the file is seekable.
SeekOption
Define the possible seek options.
FilebufIO & operator=(const FilebufIO &that)
Assignment, should not be used.
void writeBlock(Int64 size, const char *buf)
Write a block into the stream at the current offset.
virtual Bool isSeekable() const
Is the IO stream seekable?
virtual Int64 read(Int64 size, void *buf, Bool throwException=True)
Read size bytes from the File.
void detach(Bool closeFile=False)
Detach the FILE.
virtual Bool isWritable() const
Is the IO stream writable?
virtual ~FilebufIO()
The destructor closes the file when it was owned and opened and not closed yet.
void setBuffer(Int64 bufSize)
Set a new buffer size.
Abstract base class for IO on a byte stream.
virtual Int64 doSeek(Int64 offset, ByteIO::SeekOption)
Reset the position pointer to the given value.
uInt bufferSize() const
Get the buffer size.
bool Bool
Define the standard types used by Casacore.
virtual String fileName() const
Get the file name of the file attached.
Int64 readBuffer(Int64 offset, char *buf, Int64 size, Bool throwException)
Read a buffer of given length from the file at given offset.
FilebufIO()
Default constructor.
virtual Int64 length()
Get the length of the byte stream.
void writeBuffer(Int64 offset, const char *buf, Int64 size)
Write a buffer of given length into the file at given offset.
virtual void write(Int64 size, const void *buf)
Write the number of bytes.
String: the storage and methods of handling collections of characters.
void fillRWFlags(int fd)
Determine if the file descriptor is readable and/or writable.
virtual void resync()
Resync the file (i.e.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.