Constants.java

  1. /*
  2.  * Licensed to the Apache Software Foundation (ASF) under one
  3.  * or more contributor license agreements.  See the NOTICE file
  4.  * distributed with this work for additional information
  5.  * regarding copyright ownership.  The ASF licenses this file
  6.  * to you under the Apache License, Version 2.0 (the
  7.  * "License"); you may not use this file except in compliance
  8.  * with the License.  You may obtain a copy of the License at
  9.  *
  10.  *   https://www.apache.org/licenses/LICENSE-2.0
  11.  *
  12.  * Unless required by applicable law or agreed to in writing,
  13.  * software distributed under the License is distributed on an
  14.  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  15.  * KIND, either express or implied.  See the License for the
  16.  * specific language governing permissions and limitations
  17.  * under the License.
  18.  */

  19. package org.apache.commons.csv;

  20. /**
  21.  * Private constants for this package.
  22.  */
  23. final class Constants {

  24.     static final char BACKSLASH = '\\';

  25.     static final char BACKSPACE = '\b';

  26.     static final String COMMA = ",";

  27.     /**
  28.      * Starts a comment, the remainder of the line is the comment.
  29.      */
  30.     static final char COMMENT = '#';

  31.     static final char CR = '\r';

  32.     /** RFC 4180 defines line breaks as CRLF. */
  33.     static final String CRLF = "\r\n";

  34.     static final Character DOUBLE_QUOTE_CHAR = Character.valueOf('"');  // Explicit (un)boxing is intentional.

  35.     static final String EMPTY = "";

  36.     static final String[] EMPTY_STRING_ARRAY = {};

  37.     static final char FF = '\f';

  38.     static final char LF = '\n';

  39.     /**
  40.      * Unicode line separator.
  41.      */
  42.     static final String LINE_SEPARATOR = "\u2028";

  43.     /**
  44.      * Unicode next line.
  45.      */
  46.     static final String NEXT_LINE = "\u0085";

  47.     /**
  48.      * Unicode paragraph separator.
  49.      */
  50.     static final String PARAGRAPH_SEPARATOR = "\u2029";

  51.     static final char PIPE = '|';

  52.     /** ASCII record separator. */
  53.     static final char RS = 30;

  54.     static final char SP = ' ';

  55.     static final String SQL_NULL_STRING = "\\N";

  56.     static final char TAB = '\t';

  57.     /** Undefined state for the lookahead char. */
  58.     static final int UNDEFINED = -2;

  59.     /** ASCII unit separator. */
  60.     static final char US = 31;

  61.     /** No instances. */
  62.     private Constants() {
  63.         // noop
  64.     }

  65. }