28 #ifndef CASA_MEMORYIO_H
29 #define CASA_MEMORYIO_H
167 virtual void write (
Int64 size,
const void* buf);
virtual Bool isReadable() const
Is the IO stream readable?
uInt64 expandSize() const
Get the expand size (0 = not expandable).
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
virtual void write(Int64 size, const void *buf)
Write the number of bytes.
MemoryIO(uInt64 initialSize=65536, uInt64 expandSize=32768)
Construct a dynamic object with the given initial length.
SeekOption
Define the possible seek options.
virtual Int64 length()
Get the length of the data in the buffer.
unsigned long long uInt64
void setUsed(uInt64 bytesUsed)
tell the MemoryIO object how much of its internal buffer is valid data.
void clear()
Clear the buffer; i.e.
~MemoryIO()
Delete the Memory object.
uInt64 allocated() const
Get the allocated length of the buffer.
virtual Int64 read(Int64 size, void *buf, Bool throwException=True)
Read size bytes from the memory buffer.
Abstract base class for IO on a byte stream.
bool Bool
Define the standard types used by Casacore.
uChar * setBuffer(uInt64 length)
resize the internal buffer (if necessary) so that it is big enough to hold the specified number of by...
OpenOption
Define the possible ByteIO open options.
const uChar * getBuffer() const
Get the buffer containing the data.
MemoryIO & operator=(const MemoryIO &that)
virtual Int64 doSeek(Int64 offset, ByteIO::SeekOption)
Reset the position pointer to the given value.
Class for IO to a memory buffer.
virtual Bool isWritable() const
Is the IO stream writable?
Bool expand(uInt64 minSize)
virtual Bool isSeekable() const
Is the IO stream seekable?