public class IOParserContext extends ParserContext
Extended parser state that wraps the stream to be parsed to provide common IO operations for most of the basic text RDF formats.
ParserContext.ParseError
caseInsensitiveDirectives, mBaseIRI, mColumnNumber, mContext, mLineNumber, mNamespaces, mObject, mPredicate, mSubject
Constructor and Description |
---|
IOParserContext(Reader theReader,
RDFHandler theHandler,
Options theOptions) |
Modifier and Type | Method and Description |
---|---|
StringBuilder |
datatypeBuffer()
Reset the buffer for parsing datatypes and return it
|
StringBuilder |
langBuffer()
Rest the buffer that can be used for parsing language tags and return it
|
int |
peekCodePoint()
Peeks at the next Unicode code point without advancing the reader, and
returns its value.
|
int |
readCodePoint()
Reads the next Unicode code point.
|
StringBuilder |
resetSB() |
StringBuilder |
trimSB() |
void |
unread(int theCodePoint)
Pushes back a single code point by copying it to the front of the buffer.
|
void |
unread(String theStr)
Pushes back the supplied string by copying it to the front of the buffer.
|
int |
verifyCharacterOrFail(char expected) |
int |
verifyCharacterOrFail(int codePoint,
String expected) |
int |
verifyCharacterOrFail(String expected)
Verifies that the supplied character code point codePoint is one
of the expected characters specified in expected.
|
createBNode, createLiteral, currentStatement, error, error, handle, is, namespace, namespace, reportStatement, resetStatement, resolveURI
end, start
public StringBuilder langBuffer()
public StringBuilder datatypeBuffer()
public StringBuilder resetSB()
public StringBuilder trimSB()
public int peekCodePoint() throws IOException
IOException
public int readCodePoint() throws IOException
IOException
public void unread(int theCodePoint) throws IOException
readCodePoint()
will return
the same code point c again.theCodePoint
- a single Unicode code point.IOException
public void unread(@Nonnull String theStr)
readCodePoint()
will return the code points in the supplied string again, starting at the
first in the String..theStr
- the string to un-read.UncheckedIOException
public int verifyCharacterOrFail(@Nonnull String expected) throws IOException
IOException
public int verifyCharacterOrFail(@Nonnull char expected) throws IOException
IOException
public int verifyCharacterOrFail(int codePoint, @Nonnull String expected) throws InvalidRDF
InvalidRDF
Copyright © 2010-2016 Stardog Union. All Rights Reserved.