java.lang.Object
org.apache.jena.sparql.lang.sparql_10.JavaCharStream
An implementation of interface CharStream, where the stream is assumed to
contain only ASCII characters (with java-like unicode escape processing).
-
Field Summary
FieldsModifier and TypeFieldDescriptionintPosition in buffer.static final booleanWhether parser is static. -
Constructor Summary
ConstructorsConstructorDescriptionJavaCharStream(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. -
Method Summary
Modifier and TypeMethodDescriptionvoidadjustBeginLineColumn(int newLine, int newCol) Method to adjust line and column numbers for the start of a token.voidbackup(int amount) Retreat.charvoidDone()Set buffers back to null when finished.intintintDeprecated.intGet end column.intGet end line.GetImage()intgetLine()Deprecated.char[]GetSuffix(int len) charreadChar()Read a character.voidReInit(InputStream dstream) Reinitialise.voidReInit(InputStream dstream, int startline, int startcolumn) Reinitialise.voidReInit(InputStream dstream, int startline, int startcolumn, int buffersize) Reinitialise.voidReInit(InputStream dstream, String encoding) Reinitialise.voidReInit(InputStream dstream, String encoding, int startline, int startcolumn) Reinitialise.voidReInit(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize) Reinitialise.voidReinitialise.voidReinitialise.voidReinitialise.
-
Field Details
-
staticFlag
public static final boolean staticFlagWhether parser is static.- See Also:
-
bufpos
public int bufposPosition in buffer.
-
-
Constructor Details
-
JavaCharStream
Constructor. -
JavaCharStream
Constructor. -
JavaCharStream
Constructor. -
JavaCharStream
public JavaCharStream(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize) throws UnsupportedEncodingException Constructor.- Throws:
UnsupportedEncodingException
-
JavaCharStream
Constructor. -
JavaCharStream
public JavaCharStream(InputStream dstream, String encoding, int startline, int startcolumn) throws UnsupportedEncodingException Constructor.- Throws:
UnsupportedEncodingException
-
JavaCharStream
Constructor. -
JavaCharStream
Constructor.- Throws:
UnsupportedEncodingException
-
JavaCharStream
Constructor.
-
-
Method Details
-
BeginToken
- Returns:
- starting character for token.
- Throws:
IOException
-
readChar
Read a character.- Throws:
IOException
-
getColumn
Deprecated. -
getLine
Deprecated. -
getEndColumn
public int getEndColumn()Get end column. -
getEndLine
public int getEndLine()Get end line. -
getBeginColumn
public int getBeginColumn()- Returns:
- column of token start
-
getBeginLine
public int getBeginLine()- Returns:
- line number of token start
-
backup
public void backup(int amount) Retreat. -
ReInit
Reinitialise. -
ReInit
Reinitialise. -
ReInit
Reinitialise. -
ReInit
public void ReInit(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize) throws UnsupportedEncodingException Reinitialise.- Throws:
UnsupportedEncodingException
-
ReInit
Reinitialise. -
ReInit
public void ReInit(InputStream dstream, String encoding, int startline, int startcolumn) throws UnsupportedEncodingException Reinitialise.- Throws:
UnsupportedEncodingException
-
ReInit
Reinitialise. -
ReInit
Reinitialise.- Throws:
UnsupportedEncodingException
-
ReInit
Reinitialise. -
GetImage
- Returns:
- token image as String
-
GetSuffix
public char[] GetSuffix(int len) - Returns:
- 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.
-