[]
        
(Showing Draft Content)

CSJ2K.j2k.codestream.writer.BitOutputBuffer.toByteArray

toByteArray Method

toByteArray(byte[])

Returns the byte buffer data in a new array. This is a copy of the internal byte buffer. If 'data' is non-null it is used to return the data. This array should be large enough to contain all the data, otherwise a IndexOutOfBoundsException is thrown by the Java system. The number of elements returned is what 'getLength()' returns.

Declaration
public virtual byte[] toByteArray(byte[] data)
Parameters
Type Name Description
byte[] data

If non-null this array is used to return the data, which mus be large enough. Otherwise a new one is created and returned.

Returns
Type Description
byte[]

The byte buffer data.