ComponentOne PdfViewer for WPF and Silverlight
C1.WPF.PdfViewer.4.6.2 Assembly / CSJ2K.j2k.codestream.writer Namespace / BitOutputBuffer Class / toByteArray Method
If non-null this array is used to return the data, which mus be large enough. Otherwise a new one is created and returned.

In This Topic
    toByteArray Method (BitOutputBuffer)
    In This Topic
    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.
    Syntax
    'Declaration
     
    
    Public Overridable Function toByteArray( _
       ByVal data() As Byte _
    ) As Byte()
    public virtual byte[] toByteArray( 
       byte[] data
    )

    Parameters

    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.

    Return Value

    The byte buffer data.
    See Also