Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id AEA132004C8 for ; Mon, 9 May 2016 20:10:31 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id AD4C41609A8; Mon, 9 May 2016 18:10:31 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 86BB0160A0F for ; Mon, 9 May 2016 20:10:29 +0200 (CEST) Received: (qmail 18243 invoked by uid 500); 9 May 2016 18:10:28 -0000 Mailing-List: contact notifications-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list notifications@commons.apache.org Received: (qmail 18234 invoked by uid 99); 9 May 2016 18:10:28 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2016 18:10:28 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 29B73C0B7C for ; Mon, 9 May 2016 18:10:28 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.279 X-Spam-Level: X-Spam-Status: No, score=-0.279 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.079] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id CuF7rxDasny6 for ; Mon, 9 May 2016 18:10:20 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTP id 9A4C65FDE6 for ; Mon, 9 May 2016 18:10:17 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 8B745E58B9 for ; Mon, 9 May 2016 18:10:14 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id EFC0D3A1D06 for ; Mon, 9 May 2016 18:10:13 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r987833 [24/47] - in /websites/production/commons/content/proper/commons-csv/archives/1.3: ./ apidocs/ apidocs/org/ apidocs/org/apache/ apidocs/org/apache/commons/ apidocs/org/apache/commons/csv/ apidocs/org/apache/commons/csv/class-use/ ap... Date: Mon, 09 May 2016 18:10:11 -0000 To: notifications@commons.apache.org From: britter@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160509181013.EFC0D3A1D06@svn01-us-west.apache.org> archived-at: Mon, 09 May 2016 18:10:31 -0000 Added: websites/production/commons/content/proper/commons-csv/archives/1.3/jacoco/org.apache.commons.csv/Lexer.java.html ============================================================================== --- websites/production/commons/content/proper/commons-csv/archives/1.3/jacoco/org.apache.commons.csv/Lexer.java.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.3/jacoco/org.apache.commons.csv/Lexer.java.html Mon May 9 18:10:08 2016 @@ -0,0 +1,443 @@ +Lexer.java

Lexer.java

/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.csv;
+
+import static org.apache.commons.csv.Constants.BACKSPACE;
+import static org.apache.commons.csv.Constants.CR;
+import static org.apache.commons.csv.Constants.END_OF_STREAM;
+import static org.apache.commons.csv.Constants.FF;
+import static org.apache.commons.csv.Constants.LF;
+import static org.apache.commons.csv.Constants.TAB;
+import static org.apache.commons.csv.Constants.UNDEFINED;
+import static org.apache.commons.csv.Token.Type.COMMENT;
+import static org.apache.commons.csv.Token.Type.EOF;
+import static org.apache.commons.csv.Token.Type.EORECORD;
+import static org.apache.commons.csv.Token.Type.INVALID;
+import static org.apache.commons.csv.Token.Type.TOKEN;
+
+import java.io.Closeable;
+import java.io.IOException;
+
+/**
+ * Lexical analyzer.
+ *
+ * @version $Id: Lexer.java 1742468 2016-05-05 20:02:35Z britter $
+ */
+final class Lexer implements Closeable {
+
+    /**
+     * Constant char to use for disabling comments, escapes and encapsulation. The value -2 is used because it
+     * won't be confused with an EOF signal (-1), and because the Unicode value {@code FFFE} would be encoded as two
+     * chars (using surrogates) and thus there should never be a collision with a real text char.
+     */
+    private static final char DISABLED = '\ufffe';
+
+    private final char delimiter;
+    private final char escape;
+    private final char quoteChar;
+    private final char commentStart;
+
+    private final boolean ignoreSurroundingSpaces;
+    private final boolean ignoreEmptyLines;
+
+    /** The input stream */
+    private final ExtendedBufferedReader reader;
+
+    Lexer(final CSVFormat format, final ExtendedBufferedReader reader) {
+        this.reader = reader;
+        this.delimiter = format.getDelimiter();
+        this.escape = mapNullToDisabled(format.getEscapeCharacter());
+        this.quoteChar = mapNullToDisabled(format.getQuoteCharacter());
+        this.commentStart = mapNullToDisabled(format.getCommentMarker());
+        this.ignoreSurroundingSpaces = format.getIgnoreSurroundingSpaces();
+        this.ignoreEmptyLines = format.getIgnoreEmptyLines();
+    }
+
+    /**
+     * Returns the next token.
+     * <p>
+     * A token corresponds to a term, a record change or an end-of-file indicator.
+     * </p>
+     *
+     * @param token
+     *            an existing Token object to reuse. The caller is responsible to initialize the Token.
+     * @return the next token found
+     * @throws java.io.IOException
+     *             on stream access error
+     */
+    Token nextToken(final Token token) throws IOException {
+
+        // get the last read char (required for empty line detection)
+        int lastChar = reader.getLastChar();
+
+        // read the next char and set eol
+        int c = reader.read();
+        /*
+         * Note: The following call will swallow LF if c == CR. But we don't need to know if the last char was CR or LF
+         * - they are equivalent here.
+         */
+        boolean eol = readEndOfLine(c);
+
+        // empty line detection: eol AND (last char was EOL or beginning)
+        if (ignoreEmptyLines) {
+            while (eol && isStartOfLine(lastChar)) {
+                // go on char ahead ...
+                lastChar = c;
+                c = reader.read();
+                eol = readEndOfLine(c);
+                // reached end of file without any content (empty line at the end)
+                if (isEndOfFile(c)) {
+                    token.type = EOF;
+                    // don't set token.isReady here because no content
+                    return token;
+                }
+            }
+        }
+
+        // did we reach eof during the last iteration already ? EOF
+        if (isEndOfFile(lastChar) || !isDelimiter(lastChar) && isEndOfFile(c)) {
+            token.type = EOF;
+            // don't set token.isReady here because no content
+            return token;
+        }
+
+        if (isStartOfLine(lastChar) && isCommentStart(c)) {
+            final String line = reader.readLine();
+            if (line == null) {
+                token.type = EOF;
+                // don't set token.isReady here because no content
+                return token;
+            }
+            final String comment = line.trim();
+            token.content.append(comment);
+            token.type = COMMENT;
+            return token;
+        }
+
+        // important: make sure a new char gets consumed in each iteration
+        while (token.type == INVALID) {
+            // ignore whitespaces at beginning of a token
+            if (ignoreSurroundingSpaces) {
+                while (isWhitespace(c) && !eol) {
+                    c = reader.read();
+                    eol = readEndOfLine(c);
+                }
+            }
+
+            // ok, start of token reached: encapsulated, or token
+            if (isDelimiter(c)) {
+                // empty token return TOKEN("")
+                token.type = TOKEN;
+            } else if (eol) {
+                // empty token return EORECORD("")
+                // noop: token.content.append("");
+                token.type = EORECORD;
+            } else if (isQuoteChar(c)) {
+                // consume encapsulated token
+                parseEncapsulatedToken(token);
+            } else if (isEndOfFile(c)) {
+                // end of file return EOF()
+                // noop: token.content.append("");
+                token.type = EOF;
+                token.isReady = true; // there is data at EOF
+            } else {
+                // next token must be a simple token
+                // add removed blanks when not ignoring whitespace chars...
+                parseSimpleToken(token, c);
+            }
+        }
+        return token;
+    }
+
+    /**
+     * Parses a simple token.
+     * <p/>
+     * Simple token are tokens which are not surrounded by encapsulators. A simple token might contain escaped
+     * delimiters (as \, or \;). The token is finished when one of the following conditions become true:
+     * <ul>
+     * <li>end of line has been reached (EORECORD)</li>
+     * <li>end of stream has been reached (EOF)</li>
+     * <li>an unescaped delimiter has been reached (TOKEN)</li>
+     * </ul>
+     *
+     * @param token
+     *            the current token
+     * @param ch
+     *            the current character
+     * @return the filled token
+     * @throws IOException
+     *             on stream access error
+     */
+    private Token parseSimpleToken(final Token token, int ch) throws IOException {
+        // Faster to use while(true)+break than while(token.type == INVALID)
+        while (true) {
+            if (readEndOfLine(ch)) {
+                token.type = EORECORD;
+                break;
+            } else if (isEndOfFile(ch)) {
+                token.type = EOF;
+                token.isReady = true; // There is data at EOF
+                break;
+            } else if (isDelimiter(ch)) {
+                token.type = TOKEN;
+                break;
+            } else if (isEscape(ch)) {
+                final int unescaped = readEscape();
+                if (unescaped == END_OF_STREAM) { // unexpected char after escape
+                    token.content.append((char) ch).append((char) reader.getLastChar());
+                } else {
+                    token.content.append((char) unescaped);
+                }
+                ch = reader.read(); // continue
+            } else {
+                token.content.append((char) ch);
+                ch = reader.read(); // continue
+            }
+        }
+
+        if (ignoreSurroundingSpaces) {
+            trimTrailingSpaces(token.content);
+        }
+
+        return token;
+    }
+
+    /**
+     * Parses an encapsulated token.
+     * <p/>
+     * Encapsulated tokens are surrounded by the given encapsulating-string. The encapsulator itself might be included
+     * in the token using a doubling syntax (as "", '') or using escaping (as in \", \'). Whitespaces before and after
+     * an encapsulated token are ignored. The token is finished when one of the following conditions become true:
+     * <ul>
+     * <li>an unescaped encapsulator has been reached, and is followed by optional whitespace then:</li>
+     * <ul>
+     * <li>delimiter (TOKEN)</li>
+     * <li>end of line (EORECORD)</li>
+     * </ul>
+     * <li>end of stream has been reached (EOF)</li> </ul>
+     *
+     * @param token
+     *            the current token
+     * @return a valid token object
+     * @throws IOException
+     *             on invalid state: EOF before closing encapsulator or invalid character before delimiter or EOL
+     */
+    private Token parseEncapsulatedToken(final Token token) throws IOException {
+        // save current line number in case needed for IOE
+        final long startLineNumber = getCurrentLineNumber();
+        int c;
+        while (true) {
+            c = reader.read();
+
+            if (isEscape(c)) {
+                final int unescaped = readEscape();
+                if (unescaped == END_OF_STREAM) { // unexpected char after escape
+                    token.content.append((char) c).append((char) reader.getLastChar());
+                } else {
+                    token.content.append((char) unescaped);
+                }
+            } else if (isQuoteChar(c)) {
+                if (isQuoteChar(reader.lookAhead())) {
+                    // double or escaped encapsulator -> add single encapsulator to token
+                    c = reader.read();
+                    token.content.append((char) c);
+                } else {
+                    // token finish mark (encapsulator) reached: ignore whitespace till delimiter
+                    while (true) {
+                        c = reader.read();
+                        if (isDelimiter(c)) {
+                            token.type = TOKEN;
+                            return token;
+                        } else if (isEndOfFile(c)) {
+                            token.type = EOF;
+                            token.isReady = true; // There is data at EOF
+                            return token;
+                        } else if (readEndOfLine(c)) {
+                            token.type = EORECORD;
+                            return token;
+                        } else if (!isWhitespace(c)) {
+                            // error invalid char between token and next delimiter
+                            throw new IOException("(line " + getCurrentLineNumber() +
+                                    ") invalid char between encapsulated token and delimiter");
+                        }
+                    }
+                }
+            } else if (isEndOfFile(c)) {
+                // error condition (end of file before end of token)
+                throw new IOException("(startline " + startLineNumber +
+                        ") EOF reached before encapsulated token finished");
+            } else {
+                // consume character
+                token.content.append((char) c);
+            }
+        }
+    }
+
+    private char mapNullToDisabled(final Character c) {
+        return c == null ? DISABLED : c.charValue();
+    }
+
+    /**
+     * Returns the current line number
+     *
+     * @return the current line number
+     */
+    long getCurrentLineNumber() {
+        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.
+     * The current character must be the escape character.
+     * On return, the next character is available by calling {@link ExtendedBufferedReader#getLastChar()}
+     * on the input stream.
+     *
+     * @return the unescaped character (as an int) or {@link Constants#END_OF_STREAM} if char following the escape is
+     *      invalid.
+     * @throws IOException if there is a problem reading the stream or the end of stream is detected:
+     *      the escape character is not allowed at end of strem
+     */
+    int readEscape() throws IOException {
+        // the escape char has just been read (normally a backslash)
+        final int ch = reader.read();
+        switch (ch) {
+        case 'r':
+            return CR;
+        case 'n':
+            return LF;
+        case 't':
+            return TAB;
+        case 'b':
+            return BACKSPACE;
+        case 'f':
+            return FF;
+        case CR:
+        case LF:
+        case FF: // TODO is this correct?
+        case TAB: // TODO is this correct? Do tabs need to be escaped?
+        case BACKSPACE: // TODO is this correct?
+            return ch;
+        case END_OF_STREAM:
+            throw new IOException("EOF whilst processing escape sequence");
+        default:
+            // Now check for meta-characters
+            if (isMetaChar(ch)) {
+                return ch;
+            }
+            // indicate unexpected char - available from in.getLastChar()
+            return END_OF_STREAM;
+        }
+    }
+
+    void trimTrailingSpaces(final StringBuilder buffer) {
+        int length = buffer.length();
+        while (length > 0 && Character.isWhitespace(buffer.charAt(length - 1))) {
+            length = length - 1;
+        }
+        if (length != buffer.length()) {
+            buffer.setLength(length);
+        }
+    }
+
+    /**
+     * Greedily accepts \n, \r and \r\n This checker consumes silently the second control-character...
+     *
+     * @return true if the given or next character is a line-terminator
+     */
+    boolean readEndOfLine(int ch) throws IOException {
+        // check if we have \r\n...
+        if (ch == CR && reader.lookAhead() == LF) {
+            // note: does not change ch outside of this method!
+            ch = reader.read();
+        }
+        return ch == LF || ch == CR;
+    }
+
+    boolean isClosed() {
+        return reader.isClosed();
+    }
+
+    /**
+     * @return true if the given char is a whitespace character
+     */
+    boolean isWhitespace(final int ch) {
+        return !isDelimiter(ch) && Character.isWhitespace((char) ch);
+    }
+
+    /**
+     * Checks if the current character represents the start of a line: a CR, LF or is at the start of the file.
+     *
+     * @param ch the character to check
+     * @return true if the character is at the start of a line.
+     */
+    boolean isStartOfLine(final int ch) {
+        return ch == LF || ch == CR || ch == UNDEFINED;
+    }
+
+    /**
+     * @return true if the given character indicates end of file
+     */
+    boolean isEndOfFile(final int ch) {
+        return ch == END_OF_STREAM;
+    }
+
+    boolean isDelimiter(final int ch) {
+        return ch == delimiter;
+    }
+
+    boolean isEscape(final int ch) {
+        return ch == escape;
+    }
+
+    boolean isQuoteChar(final int ch) {
+        return ch == quoteChar;
+    }
+
+    boolean isCommentStart(final int ch) {
+        return ch == commentStart;
+    }
+
+    private boolean isMetaChar(final int ch) {
+        return ch == delimiter ||
+               ch == escape ||
+               ch == quoteChar ||
+               ch == commentStart;
+    }
+
+    /**
+     * Closes resources.
+     *
+     * @throws IOException
+     *             If an I/O error occurs
+     */
+    @Override
+    public void close() throws IOException {
+        reader.close();
+    }
+}
+
\ No newline at end of file Propchange: websites/production/commons/content/proper/commons-csv/archives/1.3/jacoco/org.apache.commons.csv/Lexer.java.html ------------------------------------------------------------------------------ svn:eol-style = native Added: websites/production/commons/content/proper/commons-csv/archives/1.3/jacoco/org.apache.commons.csv/QuoteMode.html ============================================================================== --- websites/production/commons/content/proper/commons-csv/archives/1.3/jacoco/org.apache.commons.csv/QuoteMode.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.3/jacoco/org.apache.commons.csv/QuoteMode.html Mon May 9 18:10:08 2016 @@ -0,0 +1 @@ +QuoteMode

QuoteMode

< /tr>
ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total5 of 5891%0 of 0n/a1405 14
valueOf(String)50%n/a111111
static {...}44100%n/a010501
QuoteMode(String, int)5100%n/a010101
values()4100%n/a010101
\ No newline at end of file Propchange: websites/production/commons/content/proper/commons-csv/archives/1.3/jacoco/org.apache.commons.csv/QuoteMode.html ------------------------------------------------------------------------------ svn:eol-style = native Added: websites/production/commons/content/proper/commons-csv/archives/1.3/jacoco/org.apache.commons.csv/QuoteMode.java.html ============================================================================== --- websites/production/commons/content/proper/commons-csv/archives/1.3/jacoco/org.apache.commons.csv/QuoteMode.java.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.3/jacoco/org.apache.commons.csv/QuoteMode.java.html Mon May 9 18:10:08 2016 @@ -0,0 +1,48 @@ +QuoteMode.java

QuoteMode.j ava

/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.csv;
+
+/**
+ * Defines quote behavior when printing.
+ *
+ * @version $Id: QuoteMode.java 1694977 2015-08-10 07:05:58Z ggregory $
+ */
+public enum QuoteMode {
+
+    /**
+     * Quotes all fields.
+     */
+    ALL,
+
+    /**
+     * Quotes fields which contain special characters such as a delimiter, quotes character or any of the characters in
+     * line separator.
+     */
+    MINIMAL,
+
+    /**
+     * Quotes all non-numeric fields.
+     */
+    NON_NUMERIC,
+
+    /**
+     * Never quotes fields. When the delimiter occurs in data, the printer prefixes it with the current escape
+     * character. If the escape character is not set, format validation throws an exception.
+     */
+    NONE
+}
+
\ No newline at end of file Propchange: websites/production/commons/content/proper/commons-csv/archives/1.3/jacoco/org.apache.commons.csv/QuoteMode.java.html ------------------------------------------------------------------------------ svn:eol-style = native Added: websites/production/commons/content/proper/commons-csv/archives/1.3/jacoco/org.apache.commons.csv/Token$Type.html ============================================================================== --- websites/production/commons/content/proper/commons-csv/archives/1.3/jacoco/org.apache.commons.csv/Token$Type.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.3/jacoco/org.apache.commons.csv/Token$Type.html Mon May 9 18:10:08 2016 @@ -0,0 +1 @@ +Token.Type

Token.Type

< /table> \ No newline at end of file Propchange: websites/production/commons/content/proper/commons-csv/archives/1.3/jacoco/org.apache.commons.csv/Token$Type.html ------------------------------------------------------------------------------ svn:eol-style = native Added: websites/production/commons/content/proper/commons-csv/archives/1.3/jacoco/org.apache.commons.csv/Token.html ============================================================================== --- websites/production/commons/content/proper/commons-csv/archives/1.3/jacoco/org.apache.commons.csv/Token.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.3/jacoco/org.apache.commons.csv/Token.html Mon May 9 18:10:08 2016 @@ -0,0 +1 @@ +Token

Token

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total5 of 6893%0 of 0n/a140614
valueOf(String)50%n/a111111
static {...}54100%n/a010601
Token.Type(String, int)5100%n/a010101
values()4100%n/a010101
ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total17 of 4057%0 of 0n/a131813
toString()170%n/a111111
Token()12100%n/a010301
reset()11100%n/a010401
\ No newline at end of file Propchange: websites/production/commons/content/proper/commons-csv/archives/1.3/jacoco/org.apache.commons.csv/Token.html ------------------------------------------------------------------------------ svn:eol-style = native Added: websites/production/commons/content/proper/commons-csv/archives/1.3/jacoco/org.apache.commons.csv/Token.java.html ============================================================================== --- websites/production/commons/content/proper/commons-csv/archives/1.3/jacoco/org.apache.commons.csv/Token.java.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.3/jacoco/org.apache.commons.csv/Token.java.html Mon May 9 18:10:08 2016 @@ -0,0 +1,76 @@ +Token.java

Token.java

/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.csv;
+
+import static org.apache.commons.csv.Token.Type.INVALID;
+
+/**
+ * Internal token representation.
+ * <p/>
+ * It is used as contract between the lexer and the parser.
+ *
+ * @version $Id: Token.java 1509069 2013-08-01 02:04:27Z ggregory $
+ */
+final class Token {
+
+    /** length of the initial token (content-)buffer */
+    private static final int INITIAL_TOKEN_LENGTH = 50;
+
+    enum Type {
+        /** Token has no valid content, i.e. is in its initialized state. */
+        INVALID,
+
+        /** Token with content, at beginning or in the middle of a line. */
+        TOKEN,
+
+        /** Token (which can have content) when the end of file is reached. */
+        EOF,
+
+        /** Token with content when the end of a line is reached. */
+        EORECORD,
+
+        /** Token is a comment line. */
+        COMMENT
+    }
+
+    /** Token type */
+    Token.Type type = INVALID;
+
+    /** The content buffer. */
+    final StringBuilder content = new StringBuilder(INITIAL_TOKEN_LENGTH);
+
+    /** Token ready flag: indicates a valid token with content (ready for the parser). */
+    boolean isReady;
+
+    void reset() {
+        content.setLength(0);
+        type = INVALID;
+        isReady = false;
+    }
+
+    /**
+     * Eases IDE debugging.
+     *
+     * @return a string helpful for debugging.
+     */
+    @Override
+    public String toString() {
+        return type.name() + " [" + content.toString() + "]";
+    }
+}
+
\ No newline at end of file Propchange: websites/production/commons/content/proper/commons-csv/archives/1.3/jacoco/org.apache.commons.csv/Token.java.html ------------------------------------------------------------------------------ svn:eol-style = native Added: websites/production/commons/content/proper/commons-csv/archives/1.3/jacoco/org.apache.commons.csv/index.html ============================================================================== --- websites/production/commons/content/proper/commons-csv/archives/1.3/jacoco/org.apache.commons.csv/index.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.3/jacoco/org.apache.commons.csv/index.html Mon May 9 18:10:08 2016 @@ -0,0 +1 @@ +org.apache.commons.csv

org.apache.commons.csv

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
Total324 of 4,26392%59 of 54889%61452457666171015
CSVFormat1221,54893%3213481%301482123006501
Lexer5253791%911192%983813202001
CSVPrinter4464394%1112392%984616901501
CSVParser2941093%55191%54529201501
CSVRecord2922288%2596%23224211901
Token172357%n/a13181301
CSVParser.new Iterator() {...}6391%12100%0112190501
Token.Type6393%n/a14061401
QuoteMode5391%n/a14051401
CSVParser.new Object() {...}3588%n/a01010101
CSVPrinter.new Object() {...}2988%n/a01010101
Assertions1785%2100%13251201
Constants57%n/a12121201
ExtendedBufferedReader191100%3197%12604501001
CSVFormat.Predefined101100%n/a050120501
\ No newline at end of file Propchange: websites/production/commons/content/proper/commons-csv/archives/1.3/jacoco/org.apache.commons.csv/index.html ------------------------------------------------------------------------------ svn:eol-style = native Added: websites/production/commons/content/proper/commons-csv/archives/1.3/jacoco/org.apache.commons.csv/index.source.html ============================================================================== --- websites/production/commons/content/proper/commons-csv/archives/1.3/jacoco/org.apache.commons.csv/index.source.html (added) +++ websites/production/commons/content/proper/commons-csv/archives/1.3/jacoco/org.apache.commons.csv/index.source.html Mon May 9 18:10:08 2016 @@ -0,0 +1 @@ +org.apache.commons.csv

org.apache.commons.csv

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
Total324 of 4,26392%59 of 54889%61452457666171015
CSVFormat.java1221,64993%3213481%301532124207002
Lexer.java5253791%911192%983813202001
CSVPrinter.java4867293%1112392%985616901602
CSVParser.java4050893%56393%557411002103
CSVRecord.java2922288%2596%23224211901
Token.java228680%n/a271142702
QuoteMode.java5391%n/a14051401
Assertions.java1785%2100%13251201
Constants.java57%n/a12121201
ExtendedBufferedReader.java191100%3197%12604501001
\ No newline at end of file Propchange: websites/production/commons/content/proper/commons-csv/archives/1.3/jacoco/org.apache.commons.csv/index.source.html ------------------------------------------------------------------------------ svn:eol-style = native