final class ByteArrayWindow extends ByteWindow
ByteWindow
with an underlying byte array for storage.Modifier and Type | Field and Description |
---|---|
private byte[] |
array |
end, pack, start
Constructor and Description |
---|
ByteArrayWindow(PackFile pack,
long o,
byte[] b) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
check(java.util.zip.Inflater inf,
byte[] tmp,
long pos,
int cnt) |
protected int |
copy(int p,
byte[] b,
int o,
int n)
Copy bytes from the window to a caller supplied buffer.
|
(package private) void |
crc32(java.util.zip.CRC32 out,
long pos,
int cnt) |
protected int |
setInput(int pos,
java.util.zip.Inflater inf)
Set the input
|
(package private) void |
write(PackOutputStream out,
long pos,
int cnt) |
contains, copy, setInput, size
ByteArrayWindow(PackFile pack, long o, byte[] b)
protected int copy(int p, byte[] b, int o, int n)
copy
in class ByteWindow
p
- offset within the window to start copying from.b
- destination buffer to copy into.o
- offset within dstbuf
to start copying into.n
- number of bytes to copy. This value may exceed the number of
bytes remaining in the window starting at offset
pos
.cnt
if cnt
exceeded the number of
bytes available.protected int setInput(int pos, java.util.zip.Inflater inf) throws java.util.zip.DataFormatException
setInput
in class ByteWindow
pos
- positioninf
- an Inflater
object.java.util.zip.DataFormatException
- if any.void crc32(java.util.zip.CRC32 out, long pos, int cnt)
void write(PackOutputStream out, long pos, int cnt) throws java.io.IOException
write
in class ByteWindow
java.io.IOException
void check(java.util.zip.Inflater inf, byte[] tmp, long pos, int cnt) throws java.util.zip.DataFormatException
java.util.zip.DataFormatException