Package com.beanit.asn1bean.ber
Class ReverseByteArrayOutputStream
java.lang.Object
java.io.OutputStream
com.beanit.asn1bean.ber.ReverseByteArrayOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionReverseByteArrayOutputStream(byte[] buffer) ReverseByteArrayOutputStream(byte[] buffer, int startingIndex) ReverseByteArrayOutputStream(byte[] buffer, int startingIndex, boolean automaticResize) ReverseByteArrayOutputStream(int bufferSize) Creates aReverseByteArrayOutputStreamwith a byte array of sizebufferSize.ReverseByteArrayOutputStream(int bufferSize, boolean automaticResize) -
Method Summary
Methods inherited from class java.io.OutputStream
close, flush, nullOutputStream, write
-
Field Details
-
buffer
public byte[] buffer -
index
public int index
-
-
Constructor Details
-
ReverseByteArrayOutputStream
public ReverseByteArrayOutputStream(int bufferSize) Creates aReverseByteArrayOutputStreamwith a byte array of sizebufferSize. The buffer will not be resized automatically. UseReverseByteArrayOutputStream(int, boolean)instead if you want the buffer to be dynamically resized.- Parameters:
bufferSize- the size of the underlying buffer
-
ReverseByteArrayOutputStream
public ReverseByteArrayOutputStream(int bufferSize, boolean automaticResize) -
ReverseByteArrayOutputStream
public ReverseByteArrayOutputStream(byte[] buffer) -
ReverseByteArrayOutputStream
public ReverseByteArrayOutputStream(byte[] buffer, int startingIndex) -
ReverseByteArrayOutputStream
public ReverseByteArrayOutputStream(byte[] buffer, int startingIndex, boolean automaticResize)
-
-
Method Details
-
write
public void write(int arg0) - Specified by:
writein classOutputStream
-
write
public void write(byte arg0) -
write
public void write(byte[] byteArray) - Overrides:
writein classOutputStream
-
getArray
public byte[] getArray()Returns a new array containing the subarray of the stream array that contains the coded content.- Returns:
- a new array containing the subarray of the stream array
-
getByteBuffer
-
reset
public void reset()
-