public class ByteArrayTokenHandler extends java.lang.Object implements TokenHandler<ByteArrayToken>
Red (ahuseyno) |
Red (ahuseyno) |
Constructor and Description |
---|
ByteArrayTokenHandler() |
Modifier and Type | Method and Description |
---|---|
void |
convertToBytes(ByteArrayToken token,
java.io.DataOutputStream outputStream)
Write the ByteArrayToken to the output array.
|
ByteArrayToken |
convertToToken(java.io.DataInputStream inputStream,
java.lang.Class<? extends ByteArrayToken> tokenType)
Read a ByteArrayToken from the input stream.
|
public void convertToBytes(ByteArrayToken token, java.io.DataOutputStream outputStream) throws java.io.IOException
convertToBytes
in interface TokenHandler<ByteArrayToken>
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 ByteArrayToken convertToToken(java.io.DataInputStream inputStream, java.lang.Class<? extends ByteArrayToken> tokenType) throws java.io.IOException
convertToToken
in interface TokenHandler<ByteArrayToken>
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)