org.jgroups.util
Class ExposedByteArrayOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.ByteArrayOutputStream
          extended by org.jgroups.util.ExposedByteArrayOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class ExposedByteArrayOutputStream
extends java.io.ByteArrayOutputStream

Extends ByteArrayOutputStream, but exposes the internal buffer. This way we don't need to call toByteArray() which copies the internal buffer

Version:
$Id: ExposedByteArrayOutputStream.java,v 1.2 2005/07/25 15:53:36 belaban Exp $
Author:
Bela Ban

Field Summary
 
Fields inherited from class java.io.ByteArrayOutputStream
buf, count
 
Constructor Summary
ExposedByteArrayOutputStream()
           
ExposedByteArrayOutputStream(int size)
           
 
Method Summary
 int getCapacity()
           
 byte[] getRawBuffer()
           
 
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExposedByteArrayOutputStream

public ExposedByteArrayOutputStream()

ExposedByteArrayOutputStream

public ExposedByteArrayOutputStream(int size)
Method Detail

getRawBuffer

public byte[] getRawBuffer()

getCapacity

public int getCapacity()


Copyright ? 1998-2005 Bela Ban. All Rights Reserved.