org.jumpi.impl.transformer.serialization
Class FastByteArrayOutputStream
java.lang.Object
|
+--java.io.OutputStream
|
+--java.io.ByteArrayOutputStream
|
+--org.jumpi.impl.transformer.serialization.FastByteArrayOutputStream
- public class FastByteArrayOutputStream
- extends java.io.ByteArrayOutputStream
An extension to the ByteArrayOutputStream to allow direct manipulation of
and access to the internal byte[] for performance reasons.
Fields inherited from class java.io.ByteArrayOutputStream |
buf, count |
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 |
FastByteArrayOutputStream
public FastByteArrayOutputStream(int size)
- Creates a new FastByteArrayOutputStream object.
- Parameters:
size
- the initial size of the internal byte[].
getInternalBuffer
public byte[] getInternalBuffer()
- Return the internal buffer without copy.
- Returns:
- the internal buffer without copy.
- See Also:
setInternalBuffer(byte[])
setInternalBuffer
public void setInternalBuffer(byte[] replacement)
- Set the internal buffer.
- Parameters:
replacement
- the new internal buffer.- See Also:
getInternalBuffer()
clear
public void clear()
- Clear the buffer's contents.
Copyright © 2003, Peter Jonathan Klauser.