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
public class DirectByteArrayOutputStream extends OutputStream
Byte array output stream that exposes the byte array directly
-
-
Constructor Summary
Constructors Constructor Description DirectByteArrayOutputStream(int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getArray()byte[]getArrayDirect()intsize()voidwrite(int b)Writes the specified byte to this output stream.-
Methods inherited from class java.io.OutputStream
close, flush, nullOutputStream, write, write
-
-
-
-
Method Detail
-
write
public void write(int b) throws IOExceptionWrites the specified byte to this output stream.- Specified by:
writein classOutputStream- Parameters:
b- thebyte.- Throws:
IOException- if an I/O error occurs. In particular, anIOExceptionmay be thrown if the output stream has been closed.
-
size
public int size()
-
getArrayDirect
public byte[] getArrayDirect()
-
getArray
public byte[] getArray()
-
-