28 #ifndef CASA_MEMORYIO_H
29 #define CASA_MEMORYIO_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/casa/IO/ByteIO.h>
SeekOption
Define the possible seek options.
OpenOption
Define the possible ByteIO open options.
void clear()
Clear the buffer; i.e.
MemoryIO(uInt64 initialSize=65536, uInt64 expandSize=32768)
Construct a dynamic object with the given initial length.
virtual Int64 length()
Get the length of the data in the buffer.
virtual Int64 doSeek(Int64 offset, ByteIO::SeekOption)
Reset the position pointer to the given value.
virtual void write(Int64 size, const void *buf)
Write the number of bytes.
void setUsed(uInt64 bytesUsed)
tell the MemoryIO object how much of its internal buffer is valid data.
MemoryIO & operator=(const MemoryIO &that)
uInt64 allocated() const
Get the allocated length of the buffer.
MemoryIO(const MemoryIO &that)
virtual Bool isSeekable() const
Is the IO stream seekable?
Bool expand(uInt64 minSize)
const uChar * getBuffer() const
Get the buffer containing the data.
uInt64 expandSize() const
Get the expand size (0 = not expandable).
MemoryIO(void *buffer, uInt64 size, ByteIO::OpenOption, uInt64 expandSize=0, Bool canDelete=False)
Construct from the given buffer with the given length.
uChar * setBuffer(uInt64 length)
resize the internal buffer (if necessary) so that it is big enough to hold the specified number of by...
virtual Bool isReadable() const
Is the IO stream readable?
virtual Int64 read(Int64 size, void *buf, Bool throwException=True)
Read size bytes from the memory buffer.
~MemoryIO()
Delete the Memory object.
MemoryIO(const void *buffer, uInt64 size)
Construct from a buffer with the given length.
virtual Bool isWritable() const
Is the IO stream writable?
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.
unsigned long long uInt64