1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
| public void writeEntryHeader(byte[] outbuf) {
int offset = 0;
offset = TarHeader.getNameBytes(this.header.name, outbuf, offset, 100);
offset = Octal.getOctalBytes((long)this.header.mode, outbuf, offset, 8);
offset = Octal.getOctalBytes((long)this.header.userId, outbuf, offset, 8);
offset = Octal.getOctalBytes((long)this.header.groupId, outbuf, offset, 8);
long size = this.header.size;
offset = Octal.getLongOctalBytes(size, outbuf, offset, 12);
offset = Octal.getLongOctalBytes(this.header.modTime, outbuf, offset, 12);
int csOffset = offset;
for(int c = 0; c < 8; ++c) {
outbuf[offset++] = 32;
}
outbuf[offset++] = this.header.linkFlag;
offset = TarHeader.getNameBytes(this.header.linkName, outbuf, offset, 100);
offset = TarHeader.getNameBytes(this.header.magic, outbuf, offset, 8);
offset = TarHeader.getNameBytes(this.header.userName, outbuf, offset, 32);
offset = TarHeader.getNameBytes(this.header.groupName, outbuf, offset, 32);
offset = Octal.getOctalBytes((long)this.header.devMajor, outbuf, offset, 8);
offset = Octal.getOctalBytes((long)this.header.devMinor, outbuf, offset, 8);
for(int var21 = TarHeader.getNameBytes(this.header.namePrefix, outbuf, offset, 155); var21 < outbuf.length; outbuf[var21++] = 0) {
}
long checkSum = this.computeCheckSum(outbuf);
Octal.getCheckSumOctalBytes(checkSum, outbuf, csOffset, 8);
}
|