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