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);
void seekp(const int pos)
Set write position.
Interface for binary output.
int getRemainingSize() const
Get remaining size.
void seekg(const int pos)
Set read position.
virtual int write(const char *buffer, const int length)
Write byte array.
virtual bool getStatus() const
Status of writer.
void clear()
Clear buffer.
JByteArrayReader(const char *buffer, const int length=0)
Constructor.
Interface for binary input.
const char * getRemainingData() const
Get remaining data.
virtual int read(char *buffer, const int length)
Read byte array.
const char * data() const
Get data.
virtual bool getStatus() const
Status of reader.
int tellg() const
Get read position.
JByteArrayWriter(const int size=65536)
Constructor.
Byte array binary output.
JByteArrayReader()
Default constructor.
int tellp() const
Get write position.
int size() const
Get size.