public static class Data.ByteData
- Object
- Data.ByteData
ImplementsData
Wraps a byte[] array as a Data object.
Constructors
public ByteData(byte[] bytes) | Creates a new Data object that wraps a byte array. |
Methods
public void appendTo(OutputStream output)
throws IOException | Appends the data’s content to an output stream. |
public long getSize()
throws IOException | Gets the size of the data content. |
Inherited nested types
Inherited methods
Constructor details
ByteData
public ByteData(byte[] bytes)Creates a new Data object that wraps a byte array.
Method details
appendTo
public void appendTo(OutputStream output)
throws IOExceptionAppends the data’s content to an output stream.
Parameters
outputOutputStream- The output stream to append to.
Throws
getSize
public long getSize()
throws IOExceptionGets the size of the data content.
Returns
Size of content in bytes.