Package org.apache.catalina.tribes.io
Class DirectByteArrayOutputStream
java.lang.Object
java.io.OutputStream
org.apache.catalina.tribes.io.DirectByteArrayOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
Byte array output stream that exposes the byte array directly
-
Constructor Summary
-
Method Summary
Methods inherited from class java.io.OutputStream
close, flush, nullOutputStream, write, write
-
Constructor Details
-
DirectByteArrayOutputStream
public DirectByteArrayOutputStream(int size)
-
-
Method Details
-
write
Writes the specified byte to this output stream.- Specified by:
write
in classOutputStream
- Parameters:
b
- thebyte
.- Throws:
IOException
- if an I/O error occurs. In particular, anIOException
may be thrown if the output stream has been closed.
-
size
public int size() -
getArrayDirect
public byte[] getArrayDirect() -
getArray
public byte[] getArray()
-