org.aminds.lucene.queryParser.regexp.parser
クラス JavaCharStream

java.lang.Object
  上位を拡張 org.aminds.lucene.queryParser.regexp.parser.JavaCharStream

public class JavaCharStream
extends Object

An implementation of interface CharStream, where the stream is assumed to contain only ASCII characters (with java-like unicode escape processing).


フィールドの概要
protected  int[] bufcolumn
           
protected  char[] buffer
           
protected  int[] bufline
           
 int bufpos
          Position in buffer.
protected  int column
           
protected  int inBuf
           
protected  Reader inputStream
           
protected  int line
           
protected  int maxNextCharInd
           
protected  char[] nextCharBuf
           
protected  int nextCharInd
           
protected  boolean prevCharIsCR
           
protected  boolean prevCharIsLF
           
static boolean staticFlag
          Whether parser is static.
protected  int tabSize
           
 
コンストラクタの概要
JavaCharStream(InputStream dstream)
          Constructor.
JavaCharStream(InputStream dstream, int startline, int startcolumn)
          Constructor.
JavaCharStream(InputStream dstream, int startline, int startcolumn, int buffersize)
          Constructor.
JavaCharStream(InputStream dstream, String encoding)
          Constructor.
JavaCharStream(InputStream dstream, String encoding, int startline, int startcolumn)
          Constructor.
JavaCharStream(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize)
          Constructor.
JavaCharStream(Reader dstream)
          Constructor.
JavaCharStream(Reader dstream, int startline, int startcolumn)
          Constructor.
JavaCharStream(Reader dstream, int startline, int startcolumn, int buffersize)
          Constructor.
 
メソッドの概要
 void adjustBeginLineColumn(int newLine, int newCol)
          Method to adjust line and column numbers for the start of a token.
protected  void AdjustBuffSize()
           
 void backup(int amount)
          Retreat.
 char BeginToken()
           
 void Done()
          Set buffers back to null when finished.
protected  void ExpandBuff(boolean wrapAround)
           
protected  void FillBuff()
           
 int getBeginColumn()
           
 int getBeginLine()
           
 int getColumn()
          推奨されていません。 
 int getEndColumn()
          Get end column.
 int getEndLine()
          Get end line.
 String GetImage()
           
 int getLine()
          推奨されていません。 
 char[] GetSuffix(int len)
           
protected  int getTabSize(int i)
           
protected  char ReadByte()
           
 char readChar()
          Read a character.
 void ReInit(InputStream dstream)
          Reinitialise.
 void ReInit(InputStream dstream, int startline, int startcolumn)
          Reinitialise.
 void ReInit(InputStream dstream, int startline, int startcolumn, int buffersize)
          Reinitialise.
 void ReInit(InputStream dstream, String encoding)
          Reinitialise.
 void ReInit(InputStream dstream, String encoding, int startline, int startcolumn)
          Reinitialise.
 void ReInit(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize)
          Reinitialise.
 void ReInit(Reader dstream)
          Reinitialise.
 void ReInit(Reader dstream, int startline, int startcolumn)
          Reinitialise.
 void ReInit(Reader dstream, int startline, int startcolumn, int buffersize)
          Reinitialise.
protected  void setTabSize(int i)
           
protected  void UpdateLineColumn(char c)
           
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

staticFlag

public static final boolean staticFlag
Whether parser is static.

関連項目:
定数フィールド値

bufpos

public int bufpos
Position in buffer.


bufline

protected int[] bufline

bufcolumn

protected int[] bufcolumn

column

protected int column

line

protected int line

prevCharIsCR

protected boolean prevCharIsCR

prevCharIsLF

protected boolean prevCharIsLF

inputStream

protected Reader inputStream

nextCharBuf

protected char[] nextCharBuf

buffer

protected char[] buffer

maxNextCharInd

protected int maxNextCharInd

nextCharInd

protected int nextCharInd

inBuf

protected int inBuf

tabSize

protected int tabSize
コンストラクタの詳細

JavaCharStream

public JavaCharStream(Reader dstream,
                      int startline,
                      int startcolumn,
                      int buffersize)
Constructor.


JavaCharStream

public JavaCharStream(Reader dstream,
                      int startline,
                      int startcolumn)
Constructor.


JavaCharStream

public JavaCharStream(Reader dstream)
Constructor.


JavaCharStream

public JavaCharStream(InputStream dstream,
                      String encoding,
                      int startline,
                      int startcolumn,
                      int buffersize)
               throws UnsupportedEncodingException
Constructor.

例外:
UnsupportedEncodingException

JavaCharStream

public JavaCharStream(InputStream dstream,
                      int startline,
                      int startcolumn,
                      int buffersize)
Constructor.


JavaCharStream

public JavaCharStream(InputStream dstream,
                      String encoding,
                      int startline,
                      int startcolumn)
               throws UnsupportedEncodingException
Constructor.

例外:
UnsupportedEncodingException

JavaCharStream

public JavaCharStream(InputStream dstream,
                      int startline,
                      int startcolumn)
Constructor.


JavaCharStream

public JavaCharStream(InputStream dstream,
                      String encoding)
               throws UnsupportedEncodingException
Constructor.

例外:
UnsupportedEncodingException

JavaCharStream

public JavaCharStream(InputStream dstream)
Constructor.

メソッドの詳細

setTabSize

protected void setTabSize(int i)

getTabSize

protected int getTabSize(int i)

ExpandBuff

protected void ExpandBuff(boolean wrapAround)

FillBuff

protected void FillBuff()
                 throws IOException
例外:
IOException

ReadByte

protected char ReadByte()
                 throws IOException
例外:
IOException

BeginToken

public char BeginToken()
                throws IOException
戻り値:
starting character for token.
例外:
IOException

AdjustBuffSize

protected void AdjustBuffSize()

UpdateLineColumn

protected void UpdateLineColumn(char c)

readChar

public char readChar()
              throws IOException
Read a character.

例外:
IOException

getColumn

@Deprecated
public int getColumn()
推奨されていません。 


getLine

@Deprecated
public int getLine()
推奨されていません。 


getEndColumn

public int getEndColumn()
Get end column.


getEndLine

public int getEndLine()
Get end line.


getBeginColumn

public int getBeginColumn()
戻り値:
column of token start

getBeginLine

public int getBeginLine()
戻り値:
line number of token start

backup

public void backup(int amount)
Retreat.


ReInit

public void ReInit(Reader dstream,
                   int startline,
                   int startcolumn,
                   int buffersize)
Reinitialise.


ReInit

public void ReInit(Reader dstream,
                   int startline,
                   int startcolumn)
Reinitialise.


ReInit

public void ReInit(Reader dstream)
Reinitialise.


ReInit

public void ReInit(InputStream dstream,
                   String encoding,
                   int startline,
                   int startcolumn,
                   int buffersize)
            throws UnsupportedEncodingException
Reinitialise.

例外:
UnsupportedEncodingException

ReInit

public void ReInit(InputStream dstream,
                   int startline,
                   int startcolumn,
                   int buffersize)
Reinitialise.


ReInit

public void ReInit(InputStream dstream,
                   String encoding,
                   int startline,
                   int startcolumn)
            throws UnsupportedEncodingException
Reinitialise.

例外:
UnsupportedEncodingException

ReInit

public void ReInit(InputStream dstream,
                   int startline,
                   int startcolumn)
Reinitialise.


ReInit

public void ReInit(InputStream dstream,
                   String encoding)
            throws UnsupportedEncodingException
Reinitialise.

例外:
UnsupportedEncodingException

ReInit

public void ReInit(InputStream dstream)
Reinitialise.


GetImage

public String GetImage()
戻り値:
token image as String

GetSuffix

public char[] GetSuffix(int len)
戻り値:
suffix

Done

public void Done()
Set buffers back to null when finished.


adjustBeginLineColumn

public void adjustBeginLineColumn(int newLine,
                                  int newCol)
Method to adjust line and column numbers for the start of a token.



Copyright (c) 2008-2011 Masashi Nakanishi.