ByteArrayInputStream Class Reference

InputStream implemented on top of a byte array. More...

Inheritance diagram for ByteArrayInputStream:

## Public Member Functions

| ByteArrayInputStream (const ByteList &bytes)
| Creates a ByteArrayInputStream. More...
virtual | ~ByteArrayInputStream ()
virtual void | close ()
| Closes this file input stream and releases any system resources associated with the stream. More...
virtual int | read (ByteBuffer &buf)
| Reads a sequence of bytes into the given buffer. More...
Public Member Functions inherited from ObjectImpl
| ObjectImpl ()
virtual | ~ObjectImpl ()
void | addRef () const
void | releaseRef () const
Public Member Functions inherited from Object
virtual const helpers::Class & | getClass () const
virtual | ~Object ()
virtual bool | instanceof (const Class &clazz) const =0
virtual const void * | cast (const Class &clazz) const =0

## Additional Inherited Members

Static Public Member Functions inherited from Object
static const helpers::Class & | getStaticClass ()
static const log4cxx::helpers::ClassRegistration & | registerClass ()
Protected Member Functions inherited from InputStream
| InputStream ()
virtual | ~InputStream ()
Protected Attributes inherited from ObjectImpl
unsigned int volatile | ref

## Detailed Description

InputStream implemented on top of a byte array.

## Constructor & Destructor Documentation

## ByteArrayInputStream()

ByteArrayInputStream | ( | const ByteList & | bytes | ) |

Creates a ByteArrayInputStream.

Parameters

  bytes | array of bytes to copy into stream.

## ~ByteArrayInputStream()

virtual ~ByteArrayInputStream | ( |  | ) |

virtual

## Member Function Documentation

## close()

virtual void close | ( |  | ) |

virtual

Closes this file input stream and releases any system resources associated with the stream.

Implements InputStream.

## read()

virtual int read | ( | ByteBuffer & | buf | ) |

virtual

Reads a sequence of bytes into the given buffer.

Parameters

  buf | The buffer into which bytes are to be transferred.

Returns
  the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.

Implements InputStream.

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

- bytearrayinputstream.h