org.joone.io
Class MemoryInputTokenizer

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

public class MemoryInputTokenizer
extends java.lang.Object
implements PatternTokenizer

Author:
pmarrone

Constructor Summary
MemoryInputTokenizer()
          Creates a new instance of MemoryInputTokenizer
MemoryInputTokenizer(double[][] array)
           
 
Method Summary
 char getDecimalPoint()
           
 int getLineno()
          Return the current line number.
 int getNumTokens()
           
 double getTokenAt(int posiz)
          Returns the value of the token at 'posiz' column of the current line Creation date: (17/10/2000 0.30.08)
 double[] getTokensArray()
          Returns an array of values of the current line Creation date: (17/10/2000 0.13.45)
 void mark()
          marks the current position.
 boolean nextLine()
          Go to the next line
 void resetInput()
          Go to the last marked position.
 void setDecimalPoint(char decimalPoint)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryInputTokenizer

public MemoryInputTokenizer()
Creates a new instance of MemoryInputTokenizer


MemoryInputTokenizer

public MemoryInputTokenizer(double[][] array)
Method Detail

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

getLineno

public int getLineno()
Return the current line number.

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

getDecimalPoint

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

nextLine

public boolean nextLine()
                 throws java.io.IOException
Go to the next line

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

getNumTokens

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

mark

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

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

getTokenAt

public double getTokenAt(int posiz)
                  throws java.io.IOException
Returns the value of the token at 'posiz' column of the current line 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 an array of values of the current line Creation date: (17/10/2000 0.13.45)

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

setDecimalPoint

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


Submit Feedback to pmarrone@users.sourceforge.net