View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    *
9    *      http://www.apache.org/licenses/LICENSE-2.0
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  
18  package org.apache.commons.csv;
19  
20  /**
21   * Constants for this package.
22   */
23  final class Constants {
24  
25      static final char BACKSLASH = '\\';
26  
27      static final char BACKSPACE = '\b';
28  
29      static final String COMMA = ",";
30  
31      /**
32       * Starts a comment, the remainder of the line is the comment.
33       */
34      static final char COMMENT = '#';
35  
36      static final char CR = '\r';
37  
38      /** RFC 4180 defines line breaks as CRLF */
39      static final String CRLF = "\r\n";
40  
41      static final Character DOUBLE_QUOTE_CHAR = Character.valueOf('"');
42  
43      static final String EMPTY = "";
44  
45      static final String[] EMPTY_STRING_ARRAY = {};
46  
47      /** The end of stream symbol */
48      static final int END_OF_STREAM = -1;
49  
50      static final char FF = '\f';
51  
52      static final char LF = '\n';
53  
54      /**
55       * Unicode line separator.
56       */
57      static final String LINE_SEPARATOR = "\u2028";
58  
59      /**
60       * Unicode next line.
61       */
62      static final String NEXT_LINE = "\u0085";
63  
64      /**
65       * Unicode paragraph separator.
66       */
67      static final String PARAGRAPH_SEPARATOR = "\u2029";
68  
69      static final char PIPE = '|';
70  
71      /** ASCII record separator */
72      static final char RS = 30;
73  
74      static final char SP = ' ';
75  
76      static final String SQL_NULL_STRING = "\\N";
77  
78      static final char TAB = '\t';
79  
80      /** Undefined state for the lookahead char */
81      static final int UNDEFINED = -2;
82  
83      /** ASCII unit separator */
84      static final char US = 31;
85  
86      /** No instances. */
87      private Constants() {
88          // noop
89      }
90  
91  }