/** * Reads characters from reader until the first EOL has been read. The EOL character or -1 is returned. */ protected int skipToEndOfLine(int c) throws IOException { while (c != -1 && c != '\r' && c != '\n') { c = readCodePoint(); } return c; }
/** * Reads characters from reader until it finds a character that is not a space or tab, and returns this * last character code point. In case the end of the character stream has been reached, -1 is returned. */ protected int skipWhitespace(int c) throws IOException { while (c == ' ' || c == '\t') { c = readCodePoint(); } return c; }
/** * Reads characters from reader until the first EOL has been read. The EOL character or -1 is returned. */ protected int skipToEndOfLine(int c) throws IOException { while (c != -1 && c != '\r' && c != '\n') { c = readCodePoint(); } return c; }
/** * Reads characters from reader until it finds a character that is not a space or tab, and returns this * last character code point. In case the end of the character stream has been reached, -1 is returned. */ protected int skipWhitespace(int c) throws IOException { while (c == ' ' || c == '\t') { c = readCodePoint(); } return c; }
/** * Peeks at the next Unicode code point without advancing the reader, and returns its value. * * @return the next Unicode code point, or -1 if the end of the stream has been reached. * @throws IOException */ protected int peekCodePoint() throws IOException { int result = readCodePoint(); unread(result); return result; }
/** * Peeks at the next Unicode code point without advancing the reader, and returns its value. * * @return the next Unicode code point, or -1 if the end of the stream has been reached. * @throws IOException */ protected int peekCodePoint() throws IOException { int result = readCodePoint(); unread(result); return result; }
/** * Reads characters from reader until the first EOL has been read. The first character after the EOL is * returned. In case the end of the character stream has been reached, -1 is returned. */ protected int skipLine(int c) throws IOException { while (c != -1 && c != '\r' && c != '\n') { c = readCodePoint(); } // c is equal to -1, \r or \n. In case of a \r, we should // check whether it is followed by a \n. if (c == '\n') { c = readCodePoint(); lineNo++; reportLocation(lineNo, 1); } else if (c == '\r') { c = readCodePoint(); if (c == '\n') { c = readCodePoint(); } lineNo++; reportLocation(lineNo, 1); } return c; }
/** * Reads characters from reader until the first EOL has been read. The first character after the EOL is * returned. In case the end of the character stream has been reached, -1 is returned. */ protected int skipLine(int c) throws IOException { while (c != -1 && c != '\r' && c != '\n') { c = readCodePoint(); } // c is equal to -1, \r or \n. In case of a \r, we should // check whether it is followed by a \n. if (c == '\n') { c = readCodePoint(); lineNo++; reportLocation(lineNo, 1); } else if (c == '\r') { c = readCodePoint(); if (c == '\n') { c = readCodePoint(); } lineNo++; reportLocation(lineNo, 1); } return c; }
c = readCodePoint(); while (c != '>') { if (c == -1) { c = readCodePoint(); if (c == -1) { throwEOFException(); c = readCodePoint(); c = readCodePoint();
c = readCodePoint(); while (c != '>') { if (c == -1) { c = readCodePoint(); if (c == -1) { throwEOFException(); c = readCodePoint(); c = readCodePoint();
/** * Verifies that there is only whitespace or comments until the end of the line. */ protected int assertLineTerminates(int c) throws IOException, RDFParseException { c = readCodePoint(); c = skipWhitespace(c); if (c == '#') { // c = skipToEndOfLine(c); } else { if (c != -1 && c != '\r' && c != '\n') { reportFatalError("Content after '.' is not allowed"); } } return c; }
/** * Verifies that there is only whitespace or comments until the end of the line. */ protected int assertLineTerminates(int c) throws IOException, RDFParseException { c = readCodePoint(); c = skipWhitespace(c); if (c == '#') { // c = skipToEndOfLine(c); } else { if (c != -1 && c != '\r' && c != '\n') { reportFatalError("Content after '.' is not allowed"); } } return c; }
c = readCodePoint(); while (c != '"') { if (c == -1) { c = readCodePoint(); if (c == -1) { throwEOFException(); c = readCodePoint(); c = readCodePoint(); c = readCodePoint(); c = readCodePoint(); c = readCodePoint(); c = readCodePoint();
c = readCodePoint(); while (c != '"') { if (c == -1) { c = readCodePoint(); if (c == -1) { throwEOFException(); c = readCodePoint(); c = readCodePoint(); c = readCodePoint(); c = readCodePoint(); c = readCodePoint(); c = readCodePoint();
c = readCodePoint(); if (c == -1) { throwEOFException(); c = readCodePoint(); if (c == -1) { throwEOFException(); c = readCodePoint(); while (c != -1 && NTriplesUtil.isValidCharacterForBNodeLabel(c)) { if (NTriplesUtil.isDot(c) && !NTriplesUtil.isValidCharacterForBNodeLabel(peekCodePoint())) { c = readCodePoint();
c = readCodePoint(); if (c == -1) { throwEOFException(); c = readCodePoint(); if (c == -1) { throwEOFException(); c = readCodePoint(); while (c != -1 && NTriplesUtil.isValidCharacterForBNodeLabel(c)) { if (NTriplesUtil.isDot(c) && !NTriplesUtil.isValidCharacterForBNodeLabel(peekCodePoint())) { c = readCodePoint();
int c = readCodePoint(); c = skipWhitespace(c);
int c = readCodePoint(); c = skipWhitespace(c);