com.go.trove.io
Class ArrayByteData

java.lang.Object
  |
  +--com.go.trove.io.ArrayByteData
All Implemented Interfaces:
ByteData, java.io.Serializable
Direct Known Subclasses:
ArrayByteData

public class ArrayByteData
extends java.lang.Object
implements ByteData, java.io.Serializable

A ByteData implementation that wraps an array of bytes.

Version:
15 , 01/05/30
Author:
Brian S O'Neill
See Also:
Serialized Form

Constructor Summary
ArrayByteData(byte[] data)
           
ArrayByteData(byte[] data, int offset, int length)
           
 
Method Summary
 long getByteCount()
          Return the amount of bytes that will be written by the writeTo method.
 void reset()
          Reset any transient data stored in this ByteData.
 void writeTo(java.io.OutputStream out)
          Writes all the bytes to the given OutputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayByteData

public ArrayByteData(byte[] data)

ArrayByteData

public ArrayByteData(byte[] data,
                     int offset,
                     int length)
Method Detail

getByteCount

public long getByteCount()
Description copied from interface: ByteData
Return the amount of bytes that will be written by the writeTo method.
Specified by:
getByteCount in interface ByteData

writeTo

public void writeTo(java.io.OutputStream out)
             throws java.io.IOException
Description copied from interface: ByteData
Writes all the bytes to the given OutputStream.
Specified by:
writeTo in interface ByteData

reset

public void reset()
Description copied from interface: ByteData
Reset any transient data stored in this ByteData. A call to getByteCount or writeTo will force this data to be restored.
Specified by:
reset in interface ByteData