source: other-projects/trunk/gs3-release-maker/apache-ant-1.6.5/src/main/org/apache/tools/tar/TarConstants.java@ 14627

Last change on this file since 14627 was 14627, checked in by oranfry, 17 years ago

initial import of the gs3-release-maker

File size: 3.4 KB
Line 
1/*
2 * Copyright 2000-2002,2004 The Apache Software Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 */
17
18/*
19 * This package is based on the work done by Timothy Gerard Endres
20 * ([email protected]) to whom the Ant project is very grateful for his great code.
21 */
22
23package org.apache.tools.tar;
24
25/**
26 * This interface contains all the definitions used in the package.
27 *
28 */
29
30public interface TarConstants {
31
32 /**
33 * The length of the name field in a header buffer.
34 */
35 int NAMELEN = 100;
36
37 /**
38 * The length of the mode field in a header buffer.
39 */
40 int MODELEN = 8;
41
42 /**
43 * The length of the user id field in a header buffer.
44 */
45 int UIDLEN = 8;
46
47 /**
48 * The length of the group id field in a header buffer.
49 */
50 int GIDLEN = 8;
51
52 /**
53 * The length of the checksum field in a header buffer.
54 */
55 int CHKSUMLEN = 8;
56
57 /**
58 * The length of the size field in a header buffer.
59 */
60 int SIZELEN = 12;
61
62 /**
63 * The length of the magic field in a header buffer.
64 */
65 int MAGICLEN = 8;
66
67 /**
68 * The length of the modification time field in a header buffer.
69 */
70 int MODTIMELEN = 12;
71
72 /**
73 * The length of the user name field in a header buffer.
74 */
75 int UNAMELEN = 32;
76
77 /**
78 * The length of the group name field in a header buffer.
79 */
80 int GNAMELEN = 32;
81
82 /**
83 * The length of the devices field in a header buffer.
84 */
85 int DEVLEN = 8;
86
87 /**
88 * LF_ constants represent the "link flag" of an entry, or more commonly,
89 * the "entry type". This is the "old way" of indicating a normal file.
90 */
91 byte LF_OLDNORM = 0;
92
93 /**
94 * Normal file type.
95 */
96 byte LF_NORMAL = (byte) '0';
97
98 /**
99 * Link file type.
100 */
101 byte LF_LINK = (byte) '1';
102
103 /**
104 * Symbolic link file type.
105 */
106 byte LF_SYMLINK = (byte) '2';
107
108 /**
109 * Character device file type.
110 */
111 byte LF_CHR = (byte) '3';
112
113 /**
114 * Block device file type.
115 */
116 byte LF_BLK = (byte) '4';
117
118 /**
119 * Directory file type.
120 */
121 byte LF_DIR = (byte) '5';
122
123 /**
124 * FIFO (pipe) file type.
125 */
126 byte LF_FIFO = (byte) '6';
127
128 /**
129 * Contiguous file type.
130 */
131 byte LF_CONTIG = (byte) '7';
132
133 /**
134 * The magic tag representing a POSIX tar archive.
135 */
136 String TMAGIC = "ustar";
137
138 /**
139 * The magic tag representing a GNU tar archive.
140 */
141 String GNU_TMAGIC = "ustar ";
142
143 /**
144 * The namr of the GNU tar entry which contains a long name.
145 */
146 String GNU_LONGLINK = "././@LongLink";
147
148 /**
149 * Identifies the *next* file on the tape as having a long name.
150 */
151 byte LF_GNUTYPE_LONGNAME = (byte) 'L';
152}
Note: See TracBrowser for help on using the repository browser.