Go to the documentation of this file.
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>
116 virtual void write (
Int64 size,
const void* buf);
126 virtual void flush();
173 Bool throwException);
virtual Bool isWritable() const
Is the IO stream writable?
uInt bufferSize() const
Get the buffer size.
virtual Bool isSeekable() const
Is the IO stream seekable?
Class for buffered IO on a file.
virtual Int64 doSeek(Int64 offset, ByteIO::SeekOption)
Reset the position pointer to the given value.
virtual ~FilebufIO()
The destructor closes the file when it was owned and opened and not closed yet.
FilebufIO()
Default constructor.
virtual void flush()
Flush the current buffer.
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.
Int64 readBlock(Int64 size, char *buf, Bool throwException)
Read a block from the stream at the current offset.
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 void write(Int64 size, const void *buf)
Write the number of bytes.
virtual Bool isReadable() const
Is the IO stream readable?
void fillSeekable()
Determine if the file is seekable.
virtual String fileName() const
Get the file name of the file attached.
this file contains all the compiler specific defines
void attach(int fd, uInt bufferSize=16384)
Attach to the given file descriptor.
virtual Int64 length()
Get the length of the byte stream.
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
String: the storage and methods of handling collections of characters.
bool Bool
Define the standard types used by Casacore.
FilebufIO & operator=(const FilebufIO &that)
Assignment, should not be used.
Abstract base class for IO on a 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 resync()
Resync the file (i.e.
SeekOption
Define the possible seek options.