net.java.sen.util
クラス CSVParser

java.lang.Object
  上位を拡張 net.java.sen.util.CSVParser

public class CSVParser
extends java.lang.Object

parse CSV file and extract token.


コンストラクタの概要
CSVParser(java.io.InputStream inputStream, java.lang.String charset)
          Constructor for a parser that reads lines from an InputStream
CSVParser(java.lang.String string)
          Constructor for a parser that reads lines from a String
 
メソッドの概要
 java.lang.String currentLine()
          Returns the unparsed current line of text
 boolean nextRow()
          Advances to the next line of CSV data, if any, skipping any remaining values on the current row
 java.lang.String nextToken()
          Reads the next value from the current line
 java.lang.String[] nextTokens()
          Returns an array of all values from the next line of the input
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

CSVParser

public CSVParser(java.io.InputStream inputStream,
                 java.lang.String charset)
          throws java.io.IOException
Constructor for a parser that reads lines from an InputStream

パラメータ:
inputStream - The InputStream to read from
charset - The charset of the InputStream
例外:
java.io.IOException

CSVParser

public CSVParser(java.lang.String string)
Constructor for a parser that reads lines from a String

パラメータ:
string - The string to read from
メソッドの詳細

nextRow

public boolean nextRow()
                throws java.io.IOException
Advances to the next line of CSV data, if any, skipping any remaining values on the current row

戻り値:
true if a line was read; false othewise
例外:
java.io.IOException

nextToken

public java.lang.String nextToken()
Reads the next value from the current line

戻り値:
token The value

nextTokens

public java.lang.String[] nextTokens()
                              throws java.io.IOException
Returns an array of all values from the next line of the input

戻り値:
tokens The values
例外:
java.io.IOException

currentLine

public java.lang.String currentLine()
Returns the unparsed current line of text

戻り値:
The line of text


Copyright ? 2008. All Rights Reserved.