public class ShortTokenHandler extends java.lang.Object implements TokenHandler<ShortToken>
| Red (ishwinde) |
| Red (ishwinde) |
| Constructor and Description |
|---|
ShortTokenHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
convertToBytes(ShortToken token,
java.io.DataOutputStream outputStream)
Convert ShortToken to a byte stream using an algorithm defined in the DataOutputStream.
|
ShortToken |
convertToToken(java.io.DataInputStream inputStream,
java.lang.Class<? extends ShortToken> tokenType)
Reads a short from the inputStream and converts it to the ShortToken.
|
public void convertToBytes(ShortToken token, java.io.DataOutputStream outputStream) throws java.io.IOException
convertToBytes in interface TokenHandler<ShortToken>token - The token to be converted to the byte stream.outputStream - The byte stream to write the token to.java.io.IOException - If cannot write to the stream.TokenHandler.convertToBytes(ptolemy.data.Token, java.io.DataOutputStream)public ShortToken convertToToken(java.io.DataInputStream inputStream, java.lang.Class<? extends ShortToken> tokenType) throws java.io.IOException
convertToToken in interface TokenHandler<ShortToken>inputStream - The stream that contains the token.tokenType - The type of the token. Should be ShortToken or it's derivatives.java.io.IOException - If the stream cannot be read.TokenHandler.convertToToken(java.io.DataInputStream, Class)