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