public class BinaryHunk
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
BinaryHunk.Type
Type of information stored in a binary hunk.
|
Modifier and Type | Field and Description |
---|---|
private static byte[] |
DELTA |
(package private) int |
endOffset
Position 1 past the end of this hunk within
file 's buf. |
private FileHeader |
file |
private int |
length
Inflated length of the data.
|
private static byte[] |
LITERAL |
(package private) int |
startOffset
Offset within
file .buf to the "literal" or "delta " line. |
private BinaryHunk.Type |
type
Type of the data meaning.
|
Constructor and Description |
---|
BinaryHunk(FileHeader fh,
int offset) |
Modifier and Type | Method and Description |
---|---|
byte[] |
getBuffer()
Get the byte array holding this hunk's patch script.
|
int |
getEndOffset()
Get offset one past the end of the hunk in
getBuffer() . |
FileHeader |
getFileHeader()
Get header for the file this hunk applies to.
|
int |
getSize()
Get inflated size of this hunk's data.
|
int |
getStartOffset()
Get offset the start of this hunk in
getBuffer() . |
BinaryHunk.Type |
getType()
Get type of this binary hunk.
|
(package private) int |
parseHunk(int ptr,
int end) |
private static final byte[] LITERAL
private static final byte[] DELTA
private final FileHeader file
final int startOffset
file
.buf to the "literal" or "delta " line.int endOffset
file
's buf.private BinaryHunk.Type type
private int length
BinaryHunk(FileHeader fh, int offset)
public FileHeader getFileHeader()
public byte[] getBuffer()
public int getStartOffset()
getBuffer()
.getBuffer()
.public int getEndOffset()
getBuffer()
.getBuffer()
.public BinaryHunk.Type getType()
public int getSize()
int parseHunk(int ptr, int end)