org.joone.io
Class StreamInputTokenizer

java.lang.Object
  extended by org.joone.io.StreamInputTokenizer
All Implemented Interfaces:
PatternTokenizer

public class StreamInputTokenizer
extends java.lang.Object
implements PatternTokenizer


Constructor Summary
StreamInputTokenizer(java.io.Reader in)
          Creates new StreamInputTokenizer
StreamInputTokenizer(java.io.Reader in, int maxBufSize)
          Creates new StreamInputTokenizer
 
Method Summary
 char getDecimalPoint()
           
 int getLineno()
          Return the current line number.
 int getNumTokens()
           
 double getTokenAt(int posiz)
          Insert the method's description here.
 double[] getTokensArray()
          Returns tokenized line Creation date: (17/10/2000 0.13.45)
 void mark()
          mark the current position.
 boolean nextLine()
          Fetchs the next line and extracts all the tokens
 void resetInput()
          Go to the last marked position.
 void setDecimalPoint(char dp)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamInputTokenizer

public StreamInputTokenizer(java.io.Reader in)
                     throws java.io.IOException
Creates new StreamInputTokenizer

Parameters:
in - The input stream
Throws:
java.io.IOException

StreamInputTokenizer

public StreamInputTokenizer(java.io.Reader in,
                            int maxBufSize)
                     throws java.io.IOException
Creates new StreamInputTokenizer

Parameters:
in - The input stream
maxBufSize - the max dimension of the input buffer
Throws:
java.io.IOException
Method Detail

getLineno

public int getLineno()
Return the current line number.

Specified by:
getLineno in interface PatternTokenizer
Returns:
the current line number

getNumTokens

public int getNumTokens()
                 throws java.io.IOException
Specified by:
getNumTokens in interface PatternTokenizer
Throws:
java.io.IOException

getTokenAt

public double getTokenAt(int posiz)
                  throws java.io.IOException
Insert the method's description here. Creation date: (17/10/2000 0.30.08)

Specified by:
getTokenAt in interface PatternTokenizer
Parameters:
posiz - int
Returns:
float
Throws:
java.io.IOException

getTokensArray

public double[] getTokensArray()
Returns tokenized line Creation date: (17/10/2000 0.13.45)

Specified by:
getTokensArray in interface PatternTokenizer
Returns:
double[]

mark

public void mark()
          throws java.io.IOException
mark the current position.

Specified by:
mark in interface PatternTokenizer
Throws:
IOException - if an I/O Error occurs

nextLine

public boolean nextLine()
                 throws java.io.IOException
Fetchs the next line and extracts all the tokens

Specified by:
nextLine in interface PatternTokenizer
Returns:
false if EOF, otherwise true
Throws:
IOException - if an I/O Error occurs

resetInput

public void resetInput()
                throws java.io.IOException
Go to the last marked position. Begin of input stream if no mark detected.

Specified by:
resetInput in interface PatternTokenizer
Throws:
java.io.IOException

setDecimalPoint

public void setDecimalPoint(char dp)
Specified by:
setDecimalPoint in interface PatternTokenizer

getDecimalPoint

public char getDecimalPoint()
Specified by:
getDecimalPoint in interface PatternTokenizer


Submit Feedback to pmarrone@users.sourceforge.net