com.isti.jevalresp
Class RespTokenizer

java.lang.Object
  extended by java.io.StreamTokenizer
      extended by com.isti.jevalresp.RespTokenizer

public class RespTokenizer
extends java.io.StreamTokenizer

Class RespTokenizer extends StreamTokenizer and sets up for 'rdseed' ASCII file parsing.


Field Summary
 
Fields inherited from class java.io.StreamTokenizer
nval, sval, TT_EOF, TT_EOL, TT_NUMBER, TT_WORD, ttype
 
Constructor Summary
RespTokenizer(java.io.Reader rdr)
          Creates an object which reads from the given input stream.
 
Method Summary
 void dumpTokens(java.io.PrintStream out)
          Sends display of tokens to the given print stream.
 java.lang.String getNonNullTokenString()
          Returns the token string fetched by 'nextToken()'.
 java.lang.String getTokenString()
          Returns the token string fetched by 'nextToken()'.
 int nextToken()
          Parses the next token from the input stream.
 
Methods inherited from class java.io.StreamTokenizer
commentChar, eolIsSignificant, lineno, lowerCaseMode, ordinaryChar, ordinaryChars, parseNumbers, pushBack, quoteChar, resetSyntax, slashSlashComments, slashStarComments, toString, whitespaceChars, wordChars
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RespTokenizer

public RespTokenizer(java.io.Reader rdr)
Creates an object which reads from the given input stream.

Parameters:
rdr - the input stream to read from.
Method Detail

nextToken

public int nextToken()
              throws java.io.IOException
Parses the next token from the input stream.

Overrides:
nextToken in class java.io.StreamTokenizer
Returns:
'StreamTokenizer.TT_WORD' if a word or a quoted string token was found (retrieve token with 'getTokenString()'); 'StreamTokenizer.TT_NUMBER' if a numeric value was parsed (retrieve token with 'getTokenString()'); or 'StreamTokenizer.TT_EOF' if the end of the input stream was reached.
Throws:
java.io.IOException - if an I/O error occurs.

getTokenString

public java.lang.String getTokenString()
Returns the token string fetched by 'nextToken()'.

Returns:
the token string, or null if none available.

getNonNullTokenString

public java.lang.String getNonNullTokenString()
Returns the token string fetched by 'nextToken()'.

Returns:
the token string, or an empty string if none available.

dumpTokens

public void dumpTokens(java.io.PrintStream out)
                throws java.io.IOException
Sends display of tokens to the given print stream.

Parameters:
out - output print stream
Throws:
java.io.IOException - if an I/O error occurs.