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
Modifier and TypeFieldDescriptionint
Position in buffer.static final boolean
Whether parser is static. -
Constructor Summary
ConstructorDescriptionJavaCharStream
(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 TypeMethodDescriptionvoid
adjustBeginLineColumn
(int newLine, int newCol) Method to adjust line and column numbers for the start of a token.void
backup
(int amount) Retreat.char
void
Done()
Set buffers back to null when finished.int
int
int
Deprecated.int
Get end column.int
Get end line.GetImage()
int
getLine()
Deprecated.char[]
GetSuffix
(int len) 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
Reinitialise.void
Reinitialise.void
Reinitialise.
-
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.
-