org.apache.derby.iapi.services.io
Class AccessibleByteArrayOutputStream
java.lang.Object
java.io.OutputStream
java.io.ByteArrayOutputStream
org.apache.derby.iapi.services.io.AccessibleByteArrayOutputStream
- public class AccessibleByteArrayOutputStream
- extends java.io.ByteArrayOutputStream
This allows us to get to the byte array to go back and
edit contents or get the array without having a copy made.
Since a copy is not made, users must be careful that no more
writes are made to the stream if the array reference is handed off.
Users of this must make the modifications *before* the
next write is done, and then release their hold on the
array.
Fields inherited from class java.io.ByteArrayOutputStream |
buf, count |
Method Summary |
byte[] |
getInternalByteArray()
The caller promises to set their variable to null
before any other calls to write to this stream are made.
|
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 |
AccessibleByteArrayOutputStream
public AccessibleByteArrayOutputStream()
AccessibleByteArrayOutputStream
public AccessibleByteArrayOutputStream(int size)
getInternalByteArray
public byte[] getInternalByteArray()
- The caller promises to set their variable to null
before any other calls to write to this stream are made.
Or promises to throw away references to the stream before
passing the array reference out of its control.
Apache Derby V10.0 Engine Documentation - Copyright © 1997,2004 The Apache Software Foundation or its licensors, as applicable.