KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > archive > io > ArchiveFileConstants


1 /* $Id: ArchiveFileConstants.java,v 1.5.2.1 2007/01/13 01:31:31 stack-sf Exp $
2  *
3  * Created on August 16th, 2006.
4  *
5  * Copyright (C) 2006 Internet Archive.
6  *
7  * This file is part of the Heritrix web crawler (crawler.archive.org).
8  *
9  * Heritrix is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU Lesser Public License as published by
11  * the Free Software Foundation; either version 2.1 of the License, or
12  * any later version.
13  *
14  * Heritrix is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU Lesser Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser Public License
20  * along with Heritrix; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22  */

23 package org.archive.io;
24
25 /**
26  * Constants used by Archive files and in Archive file processing.
27  * @author stack
28  * @version $Date: 2007/01/13 01:31:31 $ $Revision: 1.5.2.1 $
29  */

30 public interface ArchiveFileConstants {
31     /**
32      * Suffix given to files currently in use.
33      */

34     public static final String JavaDoc OCCUPIED_SUFFIX = ".open";
35     
36     /**
37      * Suffix appended to 'broken' files.
38      */

39     public static final String JavaDoc INVALID_SUFFIX = ".invalid";
40     
41     /**
42      * Compressed file extention.
43      */

44     public static final String JavaDoc COMPRESSED_FILE_EXTENSION = "gz";
45     
46     /**
47      * Dot plus compressed file extention.
48      */

49     public static final String JavaDoc DOT_COMPRESSED_FILE_EXTENSION = "." +
50         COMPRESSED_FILE_EXTENSION;
51     
52     /**
53      * Key for the Archive File version field.
54      */

55     public static final String JavaDoc VERSION_FIELD_KEY = "version";
56     
57     /**
58      * Key for the Archive File length field.
59      */

60     public static final String JavaDoc LENGTH_FIELD_KEY = "length";
61     
62     /**
63      * Key for the Archive File type field.
64      */

65     public static final String JavaDoc TYPE_FIELD_KEY = "type";
66     
67     /**
68      * Key for the Archive File URL field.
69      */

70     public static final String JavaDoc URL_FIELD_KEY = "subject-uri";
71     
72     /**
73      * Key for the Archive File Creation Date field.
74      */

75     public static final String JavaDoc DATE_FIELD_KEY = "creation-date";
76
77     /**
78      * Key for the Archive File mimetype field.
79      */

80     public static final String JavaDoc MIMETYPE_FIELD_KEY = "content-type";
81     
82     /**
83      * Key for the Archive File record field.
84      */

85     public static final String JavaDoc RECORD_IDENTIFIER_FIELD_KEY =
86         "record-identifier";
87     
88     /**
89      * Key for the Archive Record absolute offset into Archive file.
90      */

91     public static final String JavaDoc ABSOLUTE_OFFSET_KEY = "absolute-offset";
92     
93     public static final String JavaDoc READER_IDENTIFIER_FIELD_KEY =
94         "reader-identifier";
95     
96     /**
97      * Size used to preallocate stringbuffer used outputting a cdx line.
98      * The numbers below are guesses at sizes of each of the cdx fields.
99      * The ones in the below are spaces. Here is the legend used outputting
100      * the cdx line: CDX b e a m s c V n g. Consult cdx documentation on
101      * meaning of each of these fields.
102      */

103     public static final int CDX_LINE_BUFFER_SIZE = 14 + 1 + 15 + 1 + 1024 +
104         1 + 24 + 1 + + 3 + 1 + 32 + 1 + 20 + 1 + 20 + 1 + 64;
105     
106     public static final String JavaDoc DEFAULT_DIGEST_METHOD = "SHA-1";
107     
108     public static final char SINGLE_SPACE = ' ';
109     
110     public static final String JavaDoc CRLF = "\r\n";
111     
112     public static final String JavaDoc CDX = "cdx";
113     public static final String JavaDoc DUMP = "dump";
114     public static final String JavaDoc GZIP_DUMP = "gzipdump";
115     public static final String JavaDoc HEADER = "header";
116     public static final String JavaDoc NOHEAD = "nohead";
117     public static final String JavaDoc CDX_FILE = "cdxfile";
118 }
119
Popular Tags