Removed the package private method CSVParser.nextToken()
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1297431 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6cf4a36a4e
commit
9dd3dda09f
|
@ -179,7 +179,7 @@ public class CSVParser implements Iterable<String[]> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Parses from the current point in the stream til * the end of the current line.
|
||||
* Parses from the current point in the stream til the end of the current line.
|
||||
*
|
||||
* @return array of values til end of line ('null' when end of file has been reached)
|
||||
* @throws IOException on parse error or input read-failure
|
||||
|
@ -279,13 +279,6 @@ public class CSVParser implements Iterable<String[]> {
|
|||
// the lexer(s)
|
||||
// ======================================================
|
||||
|
||||
/**
|
||||
* Convenience method for <code>nextToken(null)</code>.
|
||||
*/
|
||||
Token nextToken() throws IOException {
|
||||
return nextToken(new Token());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the next token.
|
||||
* <p/>
|
||||
|
@ -580,11 +573,9 @@ public class CSVParser implements Iterable<String[]> {
|
|||
*/
|
||||
private boolean isEndOfLine(int c) throws IOException {
|
||||
// check if we have \r\n...
|
||||
if (c == '\r') {
|
||||
if (in.lookAhead() == '\n') {
|
||||
// note: does not change c outside of this method !!
|
||||
c = in.read();
|
||||
}
|
||||
if (c == '\r' && in.lookAhead() == '\n') {
|
||||
// note: does not change c outside of this method !!
|
||||
c = in.read();
|
||||
}
|
||||
return (c == '\n' || c == '\r');
|
||||
}
|
||||
|
|
|
@ -63,10 +63,10 @@ public class CSVParserTest extends TestCase {
|
|||
* type and content.
|
||||
*
|
||||
* @return String representation of token type and content
|
||||
* @throws IOException like {@link CSVParser#nextToken()}
|
||||
* @throws IOException like {@link CSVParser#nextToken(Token)}
|
||||
*/
|
||||
public String testNextToken() throws IOException {
|
||||
Token t = super.nextToken();
|
||||
Token t = super.nextToken(new Token());
|
||||
return t.type.name() + ";" + t.content + ";";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue