| 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.arj; |
| 20 |
|
| 21 |
import java.util.Arrays; |
| 22 |
|
| 23 |
final class MainHeader { |
| 24 |
|
| 25 |
static final class Flags { |
| 26 |
static final int GARBLED = 0x01; |
| 27 |
static final int OLD_SECURED_NEW_ANSI_PAGE = 0x02; |
| 28 |
static final int VOLUME = 0x04; |
| 29 |
static final int ARJPROT = 0x08; |
| 30 |
static final int PATHSYM = 0x10; |
| 31 |
static final int BACKUP = 0x20; |
| 32 |
static final int SECURED = 0x40; |
| 33 |
static final int ALTNAME = 0x80; |
| 34 |
} |
| 35 |
|
| 36 |
static final class HostOS { |
| 37 |
static final int MS_DOS = 0; |
| 38 |
static final int PRIMOS = 1; |
| 39 |
static final int UNIX = 2; |
| 40 |
static final int AMIGA = 3; |
| 41 |
static final int MAC_OS = 4; |
| 42 |
static final int OS2 = 5; |
| 43 |
static final int APPLE_GS = 6; |
| 44 |
static final int ATARI_ST = 7; |
| 45 |
static final int NeXT = 8; |
| 46 |
static final int VAX_VMS = 9; |
| 47 |
static final int WIN95 = 10; |
| 48 |
static final int WIN32 = 11; |
| 49 |
} |
| 50 |
|
| 51 |
int archiverVersionNumber; |
| 52 |
int minVersionToExtract; |
| 53 |
int hostOS; |
| 54 |
int arjFlags; |
| 55 |
int securityVersion; |
| 56 |
int fileType; |
| 57 |
int reserved; |
| 58 |
int dateTimeCreated; |
| 59 |
int dateTimeModified; |
| 60 |
long archiveSize; |
| 61 |
int securityEnvelopeFilePosition; |
| 62 |
int fileSpecPosition; |
| 63 |
int securityEnvelopeLength; |
| 64 |
int encryptionVersion; |
| 65 |
int lastChapter; |
| 66 |
int arjProtectionFactor; |
| 67 |
int arjFlags2; |
| 68 |
String name; |
| 69 |
String comment; |
| 70 |
byte[] extendedHeaderBytes; |
| 71 |
|
| 72 |
@Override |
| 73 |
public String toString() { |
| 74 |
final StringBuilder builder = new StringBuilder(); |
| 75 |
builder.append("MainHeader [archiverVersionNumber="); |
| 76 |
builder.append(archiverVersionNumber); |
| 77 |
builder.append(", minVersionToExtract="); |
| 78 |
builder.append(minVersionToExtract); |
| 79 |
builder.append(", hostOS="); |
| 80 |
builder.append(hostOS); |
| 81 |
builder.append(", arjFlags="); |
| 82 |
builder.append(arjFlags); |
| 83 |
builder.append(", securityVersion="); |
| 84 |
builder.append(securityVersion); |
| 85 |
builder.append(", fileType="); |
| 86 |
builder.append(fileType); |
| 87 |
builder.append(", reserved="); |
| 88 |
builder.append(reserved); |
| 89 |
builder.append(", dateTimeCreated="); |
| 90 |
builder.append(dateTimeCreated); |
| 91 |
builder.append(", dateTimeModified="); |
| 92 |
builder.append(dateTimeModified); |
| 93 |
builder.append(", archiveSize="); |
| 94 |
builder.append(archiveSize); |
| 95 |
builder.append(", securityEnvelopeFilePosition="); |
| 96 |
builder.append(securityEnvelopeFilePosition); |
| 97 |
builder.append(", fileSpecPosition="); |
| 98 |
builder.append(fileSpecPosition); |
| 99 |
builder.append(", securityEnvelopeLength="); |
| 100 |
builder.append(securityEnvelopeLength); |
| 101 |
builder.append(", encryptionVersion="); |
| 102 |
builder.append(encryptionVersion); |
| 103 |
builder.append(", lastChapter="); |
| 104 |
builder.append(lastChapter); |
| 105 |
builder.append(", arjProtectionFactor="); |
| 106 |
builder.append(arjProtectionFactor); |
| 107 |
builder.append(", arjFlags2="); |
| 108 |
builder.append(arjFlags2); |
| 109 |
builder.append(", name="); |
| 110 |
builder.append(name); |
| 111 |
builder.append(", comment="); |
| 112 |
builder.append(comment); |
| 113 |
builder.append(", extendedHeaderBytes="); |
| 114 |
builder.append(Arrays.toString(extendedHeaderBytes)); |
| 115 |
builder.append("]"); |
| 116 |
return builder.toString(); |
| 117 |
} |
| 118 |
} |