ewe.util
Interface ByteDecodable

All Known Implementing Classes:
Decimal

public interface ByteDecodable

A ByteDecodable object is one that can decode its data from a sequence of encoded bytes.


Method Summary
 int decodeBytes(byte[] source, int startOffsetInSource, int bytesLeftInSource)
          This requests the Object to decode itself from a stream of bytes.
 

Method Detail

decodeBytes

public int decodeBytes(byte[] source,
                       int startOffsetInSource,
                       int bytesLeftInSource)
                throws StreamCorruptedException,
                       ClassNotFoundException
This requests the Object to decode itself from a stream of bytes.

Parameters:
source - The source of the encoded bytes.
startOffsetInSource - Where the object should start decoding from.
bytesLeftInSource - The number of bytes left starting from startOffsetInSource.
Returns:
the number of bytes decoded.
Throws:
StreamCorruptedException - if the data stored in the bytes is corrupted.
ClassNotFoundException - if the class of a stored object could not be found.