org.openmuc.jasn1.ber
Class BerByteArrayOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by org.openmuc.jasn1.ber.BerByteArrayOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class BerByteArrayOutputStream
extends java.io.OutputStream


Constructor Summary
BerByteArrayOutputStream(int bufferSize)
          Creates a BerByteArrayOutputStream with a byte array of size bufferSize.
BerByteArrayOutputStream(int bufferSize, boolean automaticResize)
           
 
Method Summary
 byte[] getArray()
           
 java.nio.ByteBuffer getByteBuffer()
           
 void write(byte arg0)
           
 void write(byte[] byteArray)
           
 void write(int arg0)
           
 
Methods inherited from class java.io.OutputStream
close, flush, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BerByteArrayOutputStream

public BerByteArrayOutputStream(int bufferSize)
Creates a BerByteArrayOutputStream with a byte array of size bufferSize. The buffer will not be resized automatically. Use BerByteArrayOutputStream(int, boolean) instead if you want the buffer to be dynamically resized.

Parameters:
bufferSize - the size of the underlying buffer

BerByteArrayOutputStream

public BerByteArrayOutputStream(int bufferSize,
                                boolean automaticResize)
Method Detail

write

public void write(int arg0)
           throws java.io.IOException
Specified by:
write in class java.io.OutputStream
Throws:
java.io.IOException

write

public void write(byte arg0)
           throws java.io.IOException
Throws:
java.io.IOException

write

public void write(byte[] byteArray)
           throws java.io.IOException
Overrides:
write in class java.io.OutputStream
Throws:
java.io.IOException

getArray

public byte[] getArray()

getByteBuffer

public java.nio.ByteBuffer getByteBuffer()