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