nl.justobjects.toolkit.io
Class DByteArrayOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--java.io.ByteArrayOutputStream
              |
              +--nl.justobjects.toolkit.io.DByteArrayOutputStream

public class DByteArrayOutputStream
extends java.io.ByteArrayOutputStream

DirectByteArrayOutputStream allows to get directly at the ByteArrayOutputStream.buf array, without copying the data

Author:
$Author: just $ - Just van den Broecke - Just Objects B.V. ©

Fields inherited from class java.io.ByteArrayOutputStream
buf, count, isClosed
 
Constructor Summary
DByteArrayOutputStream()
           
DByteArrayOutputStream(int size)
          create a DirectByteArrayOutputStream pre-allocated to a given size.
 
Method Summary
 byte[] getBuf()
          Returns the input data without copying it.
 
Methods inherited from class java.io.ByteArrayOutputStream
close, ensureOpen, 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, registerNatives, wait, wait, wait
 

Constructor Detail

DByteArrayOutputStream

public DByteArrayOutputStream()

DByteArrayOutputStream

public DByteArrayOutputStream(int size)
create a DirectByteArrayOutputStream pre-allocated to a given size.
Parameters:
size - the number of bytes to preallocate
Method Detail

getBuf

public byte[] getBuf()
Returns the input data without copying it.
Returns:
the input data.


Copyright © 2000-2001 - Just Objects B.V.