1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.commons.compress.archivers.dump;
20
21
22
23
24 public final class DumpArchiveConstants {
25
26
27
28 public enum COMPRESSION_TYPE {
29 UNKNOWN(-1), ZLIB(0), BZLIB(1), LZO(2);
30
31 public static COMPRESSION_TYPE find(final int code) {
32 for (final COMPRESSION_TYPE t : values()) {
33 if (t.code == code) {
34 return t;
35 }
36 }
37
38 return UNKNOWN;
39 }
40
41 final int code;
42
43 COMPRESSION_TYPE(final int code) {
44 this.code = code;
45 }
46 }
47
48
49
50
51 public enum SEGMENT_TYPE {
52 TAPE(1), INODE(2), BITS(3), ADDR(4), END(5), CLRI(6);
53
54 public static SEGMENT_TYPE find(final int code) {
55 for (final SEGMENT_TYPE t : values()) {
56 if (t.code == code) {
57 return t;
58 }
59 }
60
61 return null;
62 }
63
64 final int code;
65
66 SEGMENT_TYPE(final int code) {
67 this.code = code;
68 }
69 }
70
71 public static final int TP_SIZE = 1024;
72 public static final int NTREC = 10;
73 public static final int HIGH_DENSITY_NTREC = 32;
74 public static final int OFS_MAGIC = 60011;
75 public static final int NFS_MAGIC = 60012;
76 public static final int FS_UFS2_MAGIC = 0x19540119;
77 public static final int CHECKSUM = 84446;
78
79 public static final int LBLSIZE = 16;
80
81 public static final int NAMELEN = 64;
82
83
84 private DumpArchiveConstants() {
85 }
86 }