28 #ifndef CASA_FILEBUFIO_H
29 #define CASA_FILEBUFIO_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/casa/IO/ByteIO.h>
35 #include <casacore/casa/BasicSL/String.h>
173 Bool throwException);
SeekOption
Define the possible seek options.
virtual Bool isSeekable() const
Is the IO stream seekable?
uInt bufferSize() const
Get the buffer size.
Int64 readBlock(Int64 size, char *buf, Bool throwException)
Read a block from the stream at the current offset.
FilebufIO()
Default constructor.
void writeBuffer(Int64 offset, const char *buf, Int64 size)
Write a buffer of given length into the file at given offset.
void fillRWFlags(int fd)
Determine if the file descriptor is readable and/or writable.
Int64 readBuffer(Int64 offset, char *buf, Int64 size, Bool throwException)
Read a buffer of given length from the file at given offset.
void writeBlock(Int64 size, const char *buf)
Write a block into the stream at the current offset.
void setBuffer(Int64 bufSize)
Set a new buffer size.
virtual Bool isWritable() const
Is the IO stream writable?
FilebufIO & operator=(const FilebufIO &that)
Assignment, should not be used.
virtual ~FilebufIO()
The destructor closes the file when it was owned and opened and not closed yet.
void attach(int fd, uInt bufferSize=16384)
Attach to the given file descriptor.
virtual Int64 length()
Get the length of the byte stream.
virtual String fileName() const
Get the file name of the file attached.
void detach(Bool closeFile=False)
Detach the FILE.
FilebufIO(const FilebufIO &that)
Copy constructor, should not be used.
virtual void resync()
Resync the file (i.e.
virtual Int64 read(Int64 size, void *buf, Bool throwException=True)
Read size bytes from the File.
virtual void write(Int64 size, const void *buf)
Write the number of bytes.
void fillSeekable()
Determine if the file is seekable.
virtual Bool isReadable() const
Is the IO stream readable?
virtual Int64 doSeek(Int64 offset, ByteIO::SeekOption)
Reset the position pointer to the given value.
FilebufIO(int fd, uInt bufferSize=16384)
Construct from the given file descriptor.
virtual void flush()
Flush the current buffer.
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.