Package org.apache.catalina.tribes.io
Class DirectByteArrayOutputStream
- java.lang.Object
- 
- java.io.OutputStream
- 
- org.apache.catalina.tribes.io.DirectByteArrayOutputStream
 
 
- 
- All Implemented Interfaces:
- java.io.Closeable,- java.io.Flushable,- java.lang.AutoCloseable
 
 public class DirectByteArrayOutputStream extends java.io.OutputStreamByte array output stream that exposes the byte array directly
- 
- 
Constructor SummaryConstructors Constructor Description DirectByteArrayOutputStream(int size)
 - 
Method SummaryAll 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.
 
- 
- 
- 
Method Detail- 
writepublic void write(int b) throws java.io.IOExceptionWrites the specified byte to this output stream.- Specified by:
- writein class- java.io.OutputStream
- Parameters:
- b- the- byte.
- Throws:
- java.io.IOException- if an I/O error occurs. In particular, an- IOExceptionmay be thrown if the output stream has been closed.
 
 - 
sizepublic int size() 
 - 
getArrayDirectpublic byte[] getArrayDirect() 
 - 
getArraypublic byte[] getArray() 
 
- 
 
-