[]
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.
public virtual byte[] toByteArray(byte[] data)
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. |
Type | Description |
---|---|
byte[] | The byte buffer data. |