Rename method from "is" prefix to "read" prefix because it is not just a test method, it may actually consume input.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1397924 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2a8ce4a11c
commit
c7576ccded
|
@ -55,7 +55,7 @@ class CSVLexer1 extends Lexer {
|
|||
* is to call 'readAgain' on the stream...
|
||||
*/
|
||||
int c = in.read();
|
||||
boolean eol = isEndOfLine(c);
|
||||
boolean eol = readEndOfLine(c);
|
||||
c = in.getLastChar();
|
||||
|
||||
// empty line detection: eol AND (last char was EOL or beginning)
|
||||
|
@ -66,7 +66,7 @@ class CSVLexer1 extends Lexer {
|
|||
// go on char ahead ...
|
||||
lastChar = c;
|
||||
c = in.read();
|
||||
eol = isEndOfLine(c);
|
||||
eol = readEndOfLine(c);
|
||||
c = in.getLastChar();
|
||||
// reached end of file without any content (empty line at the end)
|
||||
if (isEndOfFile(c)) {
|
||||
|
@ -89,7 +89,7 @@ class CSVLexer1 extends Lexer {
|
|||
while (isWhitespace(c) && !eol) {
|
||||
wsBuf.append((char) c);
|
||||
c = in.read();
|
||||
eol = isEndOfLine(c);
|
||||
eol = readEndOfLine(c);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -147,7 +147,7 @@ class CSVLexer1 extends Lexer {
|
|||
*/
|
||||
private Token simpleTokenLexer(final Token tkn, int c) throws IOException {
|
||||
while (true) {
|
||||
if (isEndOfLine(c)) {
|
||||
if (readEndOfLine(c)) {
|
||||
// end of record
|
||||
tkn.type = EORECORD;
|
||||
tkn.isReady = true;
|
||||
|
@ -218,7 +218,7 @@ class CSVLexer1 extends Lexer {
|
|||
tkn.type = EOF;
|
||||
tkn.isReady = true;
|
||||
return tkn;
|
||||
} else if (isEndOfLine(c)) {
|
||||
} else if (readEndOfLine(c)) {
|
||||
// ok eo token reached
|
||||
tkn.type = EORECORD;
|
||||
tkn.isReady = true;
|
||||
|
|
|
@ -60,7 +60,7 @@ class CSVLexer1306663 extends Lexer {
|
|||
* this has no effect outside of the method. so a simple workaround
|
||||
* is to call 'readAgain' on the stream...
|
||||
*/
|
||||
boolean eol = isEndOfLine(c);
|
||||
boolean eol = readEndOfLine(c);
|
||||
c = in.getLastChar();
|
||||
|
||||
// empty line detection: eol AND (last char was EOL or beginning)
|
||||
|
@ -69,7 +69,7 @@ class CSVLexer1306663 extends Lexer {
|
|||
// go on char ahead ...
|
||||
lastChar = c;
|
||||
c = in.read();
|
||||
eol = isEndOfLine(c);
|
||||
eol = readEndOfLine(c);
|
||||
c = in.getLastChar();
|
||||
// reached end of file without any content (empty line at the end)
|
||||
if (isEndOfFile(c)) {
|
||||
|
@ -93,7 +93,7 @@ class CSVLexer1306663 extends Lexer {
|
|||
if (ignoreSurroundingSpaces) {
|
||||
while (isWhitespace(c) && !eol) {
|
||||
c = in.read();
|
||||
eol = isEndOfLine(c);
|
||||
eol = readEndOfLine(c);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -142,7 +142,7 @@ class CSVLexer1306663 extends Lexer {
|
|||
private Token simpleTokenLexer(final Token tkn, int c) throws IOException {
|
||||
// Faster to use while(true)+break than while(tkn.type == INVALID)
|
||||
while (true) {
|
||||
if (isEndOfLine(c)) {
|
||||
if (readEndOfLine(c)) {
|
||||
tkn.type = EORECORD;
|
||||
break;
|
||||
} else if (isEndOfFile(c)) {
|
||||
|
@ -207,7 +207,7 @@ class CSVLexer1306663 extends Lexer {
|
|||
tkn.type = EOF;
|
||||
tkn.isReady = true; // There is data at EOF
|
||||
return tkn;
|
||||
} else if (isEndOfLine(c)) {
|
||||
} else if (readEndOfLine(c)) {
|
||||
// ok eo token reached
|
||||
tkn.type = EORECORD;
|
||||
return tkn;
|
||||
|
|
|
@ -54,7 +54,7 @@ class CSVLexer1306667 extends Lexer {
|
|||
* this has no effect outside of the method. so a simple workaround
|
||||
* is to call 'readAgain' on the stream...
|
||||
*/
|
||||
boolean eol = isEndOfLine(c);
|
||||
boolean eol = readEndOfLine(c);
|
||||
c = in.getLastChar();
|
||||
|
||||
// empty line detection: eol AND (last char was EOL or beginning)
|
||||
|
@ -63,7 +63,7 @@ class CSVLexer1306667 extends Lexer {
|
|||
// go on char ahead ...
|
||||
lastChar = c;
|
||||
c = in.read();
|
||||
eol = isEndOfLine(c);
|
||||
eol = readEndOfLine(c);
|
||||
c = in.getLastChar();
|
||||
// reached end of file without any content (empty line at the end)
|
||||
if (isEndOfFile(c)) {
|
||||
|
@ -93,7 +93,7 @@ class CSVLexer1306667 extends Lexer {
|
|||
if (ignoreSurroundingSpaces) {
|
||||
while (isWhitespace(c) && !eol) {
|
||||
c = in.read();
|
||||
eol = isEndOfLine(c);
|
||||
eol = readEndOfLine(c);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -142,7 +142,7 @@ class CSVLexer1306667 extends Lexer {
|
|||
private Token simpleTokenLexer(final Token tkn, int c) throws IOException {
|
||||
// Faster to use while(true)+break than while(tkn.type == INVALID)
|
||||
while (true) {
|
||||
if (isEndOfLine(c)) {
|
||||
if (readEndOfLine(c)) {
|
||||
tkn.type = EORECORD;
|
||||
break;
|
||||
} else if (isEndOfFile(c)) {
|
||||
|
@ -207,7 +207,7 @@ class CSVLexer1306667 extends Lexer {
|
|||
tkn.type = EOF;
|
||||
tkn.isReady = true; // There is data at EOF
|
||||
return tkn;
|
||||
} else if (isEndOfLine(c)) {
|
||||
} else if (readEndOfLine(c)) {
|
||||
// ok eo token reached
|
||||
tkn.type = EORECORD;
|
||||
return tkn;
|
||||
|
|
Loading…
Reference in New Issue