Go to the documentation of this file. 1 #ifndef __JIO__JBYTEARRAYIO__
2 #define __JIO__JBYTEARRAYIO__
16 namespace JPP {
using namespace JIO; }
136 virtual int read(
char* buffer,
const int length)
226 virtual int write(
const char* buffer,
const int length)
228 if (
__pos + length > (
int) this->size()) {
229 this->resize(
__pos + length);
232 memcpy(this->data() +
__pos, buffer, length);
Interface for binary input.
virtual int write(const char *buffer, const int length)
Write byte array.
void seekp(const int pos)
Set write position.
virtual bool getStatus() const
Status of writer.
int getRemainingSize() const
Get remaining size.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
void clear()
Clear buffer.
const char * getRemainingData() const
Get remaining data.
Interface for binary output.
int tellp() const
Get write position.
virtual bool getStatus() const
Status of reader.
int tellg() const
Get read position.
JByteArrayReader(const char *buffer, const int length=0)
Constructor.
int size() const
Get size.
JByteArrayWriter(const int size=65536)
Constructor.
JByteArrayReader()
Default constructor.
Auxiliary classes and methods for binary I/O.
virtual int read(char *buffer, const int length)
Read byte array.
void seekg(const int pos)
Set read position.
Byte array binary output.
const char * data() const
Get data.