org.seasar.extension.jdbc.gen.internal.data
クラス DumpFileTokenizer

java.lang.Object
  上位を拡張 org.seasar.extension.jdbc.gen.internal.data.DumpFileTokenizer

public class DumpFileTokenizer
extends java.lang.Object

ダンプファイル内のトークンを認識するクラスです。

作成者:
taedium

入れ子のクラスの概要
static class DumpFileTokenizer.TokenType
          トークンタイプ
 
フィールドの概要
protected  java.lang.StringBuilder buf
          バッファ
protected  char delimiter
          区切り文字
protected  boolean endOfFile
          ファイルの終端の場合true
protected  int length
          バッファの長さ
protected  int nextPos
          バッファ内の次の位置
protected  int pos
          バッファ内の現在位置
protected  java.lang.String token
          トークン
protected  DumpFileTokenizer.TokenType type
          トークンのタイプ
 
コンストラクタの概要
DumpFileTokenizer(char delimiter)
          インスタンスを構築します。
 
メソッドの概要
 void addChars(char[] chars, int len)
          文字をchar配列として追加します。
 java.lang.String getToken()
          トークンを返します。
protected  boolean isCRLF(int index)
          CRLFを表す場合true
protected  boolean isEndOfLine(int index)
          行の終端の場合trueを返します。
 DumpFileTokenizer.TokenType nextToken()
          次のトークンタイプを返します。
protected  void peek(int index)
          次のトークンを前もって調べます。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

buf

protected java.lang.StringBuilder buf
バッファ


pos

protected int pos
バッファ内の現在位置


nextPos

protected int nextPos
バッファ内の次の位置


length

protected int length
バッファの長さ


delimiter

protected char delimiter
区切り文字


type

protected DumpFileTokenizer.TokenType type
トークンのタイプ


token

protected java.lang.String token
トークン


endOfFile

protected boolean endOfFile
ファイルの終端の場合true

コンストラクタの詳細

DumpFileTokenizer

public DumpFileTokenizer(char delimiter)
インスタンスを構築します。

パラメータ:
delimiter - 区切り文字
メソッドの詳細

addChars

public void addChars(char[] chars,
                     int len)
文字をchar配列として追加します。

パラメータ:
chars - char配列としての文字
len - 有効な文字の長さ、ファイルの終端の場合-1

peek

protected void peek(int index)
次のトークンを前もって調べます。

パラメータ:
index - 開始インデックス

isEndOfLine

protected boolean isEndOfLine(int index)
行の終端の場合trueを返します。

パラメータ:
index - 開始インデックス
戻り値:
行の終端の場合true

isCRLF

protected boolean isCRLF(int index)
CRLFを表す場合true

パラメータ:
index - 開始インデックス
戻り値:
CRLFを表す場合true

nextToken

public DumpFileTokenizer.TokenType nextToken()
次のトークンタイプを返します。

戻り値:
次のトークンタイプ

getToken

public java.lang.String getToken()
トークンを返します。

戻り値:
トークン


Copyright © 2004-2014 The Seasar Foundation. All Rights Reserved.