public class UnsignedByteTokenHandler extends java.lang.Object implements TokenHandler<UnsignedByteToken>
Constructor and Description |
---|
UnsignedByteTokenHandler() |
Modifier and Type | Method and Description |
---|---|
void |
convertToBytes(UnsignedByteToken token,
java.io.DataOutputStream outputStream)
Write the UnsignedByteToken to a byte array.
|
UnsignedByteToken |
convertToToken(java.io.DataInputStream inputStream,
java.lang.Class<? extends UnsignedByteToken> tokenType)
Read a UnsignedByteToken from the input stream.
|
public void convertToBytes(UnsignedByteToken token, java.io.DataOutputStream outputStream) throws java.io.IOException
convertToBytes
in interface TokenHandler<UnsignedByteToken>
token
- Token to be converted to bytes.outputStream
- The stream to write to.java.io.IOException
- If the stream cannot be written.TokenHandler.convertToBytes(ptolemy.data.Token, java.io.DataOutputStream)
public UnsignedByteToken convertToToken(java.io.DataInputStream inputStream, java.lang.Class<? extends UnsignedByteToken> tokenType) throws java.io.IOException
convertToToken
in interface TokenHandler<UnsignedByteToken>
inputStream
- The stream to read from.tokenType
- The type of token to be parsed.java.io.IOException
- If the stream cannot be read.TokenHandler.convertToToken(java.io.DataInputStream, Class)