KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > tools > tar > TarConstants


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
19 /*
20  * This package is based on the work done by Timothy Gerard Endres
21  * (time@ice.com) to whom the Ant project is very grateful for his great code.
22  */

23
24 package org.apache.tools.tar;
25
26 /**
27  * This interface contains all the definitions used in the package.
28  *
29  */

30
31 public interface TarConstants {
32
33     /**
34      * The length of the name field in a header buffer.
35      */

36     int NAMELEN = 100;
37
38     /**
39      * The length of the mode field in a header buffer.
40      */

41     int MODELEN = 8;
42
43     /**
44      * The length of the user id field in a header buffer.
45      */

46     int UIDLEN = 8;
47
48     /**
49      * The length of the group id field in a header buffer.
50      */

51     int GIDLEN = 8;
52
53     /**
54      * The length of the checksum field in a header buffer.
55      */

56     int CHKSUMLEN = 8;
57
58     /**
59      * The length of the size field in a header buffer.
60      */

61     int SIZELEN = 12;
62
63     /**
64      * The maximum size of a file in a tar archive (That's 11 sevens, octal).
65      */

66     long MAXSIZE = 077777777777L;
67
68     /**
69      * The length of the magic field in a header buffer.
70      */

71     int MAGICLEN = 8;
72
73     /**
74      * The length of the modification time field in a header buffer.
75      */

76     int MODTIMELEN = 12;
77
78     /**
79      * The length of the user name field in a header buffer.
80      */

81     int UNAMELEN = 32;
82
83     /**
84      * The length of the group name field in a header buffer.
85      */

86     int GNAMELEN = 32;
87
88     /**
89      * The length of the devices field in a header buffer.
90      */

91     int DEVLEN = 8;
92
93     /**
94      * LF_ constants represent the "link flag" of an entry, or more commonly,
95      * the "entry type". This is the "old way" of indicating a normal file.
96      */

97     byte LF_OLDNORM = 0;
98
99     /**
100      * Normal file type.
101      */

102     byte LF_NORMAL = (byte) '0';
103
104     /**
105      * Link file type.
106      */

107     byte LF_LINK = (byte) '1';
108
109     /**
110      * Symbolic link file type.
111      */

112     byte LF_SYMLINK = (byte) '2';
113
114     /**
115      * Character device file type.
116      */

117     byte LF_CHR = (byte) '3';
118
119     /**
120      * Block device file type.
121      */

122     byte LF_BLK = (byte) '4';
123
124     /**
125      * Directory file type.
126      */

127     byte LF_DIR = (byte) '5';
128
129     /**
130      * FIFO (pipe) file type.
131      */

132     byte LF_FIFO = (byte) '6';
133
134     /**
135      * Contiguous file type.
136      */

137     byte LF_CONTIG = (byte) '7';
138
139     /**
140      * The magic tag representing a POSIX tar archive.
141      */

142     String JavaDoc TMAGIC = "ustar";
143
144     /**
145      * The magic tag representing a GNU tar archive.
146      */

147     String JavaDoc GNU_TMAGIC = "ustar ";
148
149     /**
150      * The namr of the GNU tar entry which contains a long name.
151      */

152     String JavaDoc GNU_LONGLINK = "././@LongLink";
153
154     /**
155      * Identifies the *next* file on the tape as having a long name.
156      */

157     byte LF_GNUTYPE_LONGNAME = (byte) 'L';
158 }
159
Popular Tags