View Javadoc

1   /*
2    * $Id: AsciiCodes.java,v 1.1 2004/03/03 10:08:01 mch Exp $
3    */
4   
5   package org.astrogrid.io.ascii;
6   
7   /***
8    * Description: ASCII Codes.  An interface that can be implemented by
9    * any class that wants short-cut access to various standard ASCII
10   * codes, such as Line Feed (LF), End of File (EOF), etc
11   *
12   * @see Subsystem    : JUICE
13   *
14   * @version          :
15   * @ADD Chapter      :
16   * @Created          : 16/01/2000
17   * @Last Update      :
18   * @CMS Library      :
19   *
20   * @author           : M Hill
21   *
22   *
23   **/
24  
25  public interface AsciiCodes
26  {
27     /*** NUL - char 0 */
28     public static char NUL    = '\u0000';     //byte 0
29     /*** Line Feed - char 10 */
30     public static char LF     = '\u0009' +1;  //for some reason doesn't like 000a
31     /*** Carriage Return - char 13 */
32     public static char CR     = '\u000c' +1;  //doesn't like 000d either
33     /*** Carriage Return - byte 13 (8 bit) */
34     public static byte CR8    = 13;
35     /*** End of File - char 27  */
36     public static char EOF    = '\u001b';     //end of file
37  
38     /*** Space - char 32 */
39     public static char SPACE  = '\u0020';
40     /*** Space - byte 32 (8 bit) */
41     public static byte SPACE8 = 32;
42  
43     /*** single quote/inverted comma */
44     public static char PIP    = new String("'").charAt(0); //inverted comma/single quote
45     /*** double quote */
46     public static char QUOTE  = '"';          //double quote
47  
48     /*** New line - created from '\n' */
49     public static byte[] NL   = "\n".getBytes();
50     /*** New line - 8 bit, NB this is probably platform dependent... */
51     public static byte NL8    = CR8;          //new line (or byte[] NL8 = { CR8, LF8} )
52  }
53  
54  /*
55  $Log: AsciiCodes.java,v $
56  Revision 1.1  2004/03/03 10:08:01  mch
57  Moved UI and some IO stuff into client
58  
59  Revision 1.1  2003/11/14 00:36:40  mch
60  Code restructure
61  
62  Revision 1.3  2003/10/02 12:53:49  mch
63  It03-Close
64  
65   */