diff --git a/src/main/java/org/apache/commons/csv/Lexer.java b/src/main/java/org/apache/commons/csv/Lexer.java index 8494dd1f..913e89ae 100644 --- a/src/main/java/org/apache/commons/csv/Lexer.java +++ b/src/main/java/org/apache/commons/csv/Lexer.java @@ -34,7 +34,7 @@ import java.io.Closeable; import java.io.IOException; /** - * + * Lexical analyzer. * * @version $Id$ */ @@ -301,6 +301,15 @@ final class Lexer implements Closeable { return reader.getCurrentLineNumber(); } + /** + * Returns the current character position + * + * @return the current character position + */ + long getCharacterPosition() { + return reader.getPosition(); + } + // TODO escape handling needs more work /** * Handle an escape sequence.