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