org.openbandy.io.rms
Class DirectByteArrayOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.ByteArrayOutputStream
          extended by org.openbandy.io.rms.DirectByteArrayOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class DirectByteArrayOutputStream
extends java.io.ByteArrayOutputStream

A version of ByteArrayOutputStream that gives you direct access to the underlying byte array if needed. (see http://developers.sun.com/techtopics/mobility/midp/articles/databasemapextend/)

(c) Copyright P. Bolliger 2007, ALL RIGHTS RESERVED.

Version:
1.0
Author:
Philipp Bolliger (philipp@bolliger.name)

Constructor Summary
DirectByteArrayOutputStream()
           
DirectByteArrayOutputStream(int size)
           
 
Method Summary
 byte[] getByteArray()
          TODO comment!
 byte[] swap(byte[] newBuf)
          TODO comment!
 
Methods inherited from class java.io.ByteArrayOutputStream
close, reset, size, toByteArray, toString, toString, toString, write, write, writeTo
 
Methods inherited from class java.io.OutputStream
flush, write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DirectByteArrayOutputStream

public DirectByteArrayOutputStream()

DirectByteArrayOutputStream

public DirectByteArrayOutputStream(int size)
Method Detail

getByteArray

public byte[] getByteArray()
TODO comment!

Returns:

swap

public byte[] swap(byte[] newBuf)
TODO comment!

Parameters:
newBuf -
Returns: