io::ByteArrayOutputStream Class Reference

This class implements an output stream in which the data is written into a byte array. The buffer automatically grows as data is written to it. The data can be retrieved using toByteArray() and toString(). More...

#include <ByteArrayOutputStream.h>

Inheritance diagram for io::ByteArrayOutputStream:

Inheritance graph
[legend]
Collaboration diagram for io::ByteArrayOutputStream:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ByteArrayOutputStream (int32 size=0)
virtual ~ByteArrayOutputStream ()
void reset ()
int32 size () const
const char * toByteArray () const
lang::String toNatString () const
void writeTo (OutputStream *pStreamOut)
void write (const char data)
void write (const lang::String &data)
void write (const char *pData, int32 size)
const char * toString ()


Detailed Description

This class implements an output stream in which the data is written into a byte array. The buffer automatically grows as data is written to it. The data can be retrieved using toByteArray() and toString().

Constructor & Destructor Documentation

io::ByteArrayOutputStream::ByteArrayOutputStream ( int32  size = 0  ) 

Constructor

virtual io::ByteArrayOutputStream::~ByteArrayOutputStream (  )  [virtual]

Destructor


Member Function Documentation

void io::ByteArrayOutputStream::reset (  ) 

Resets the count field of this byte array output stream to zero, so that all currently accumulated output in the ouput stream is discarded.

int32 io::ByteArrayOutputStream::size (  )  const

Returns the current size of the buffer.

const char* io::ByteArrayOutputStream::toByteArray (  )  const

Creates a newly allocated byte array.

lang::String io::ByteArrayOutputStream::toNatString (  )  const

Returns byte array identifier.

void io::ByteArrayOutputStream::writeTo ( OutputStream pStreamOut  ) 

Writes the complete contents of this byte array output stream to the specified output stream argument, as if by calling the output stream's write method using out.write(buf, count).

Parameters:
out The output outputstream

void io::ByteArrayOutputStream::write ( const char  data  )  [virtual]

void io::ByteArrayOutputStream::write ( const lang::String data  )  [virtual]

void io::ByteArrayOutputStream::write ( const char *  pData,
int32  size 
) [virtual]

See also:
OutputStream::write(const void* data, int32 size)

Implements io::OutputStream.

const char* io::ByteArrayOutputStream::toString (  )  [virtual]

See also:
Object::toString()

Implements Object.


The documentation for this class was generated from the following file:

Generated on Mon Mar 3 10:53:09 2008 for Aika by  doxygen 1.5.5