final class ByteBufferWindow extends ByteWindow
ByteBuffer
for storage.ByteWindow
Modifier and Type | Field and Description |
---|---|
private java.nio.ByteBuffer |
buffer |
end, pack, start
Constructor and Description |
---|
ByteBufferWindow(PackFile pack,
long o,
java.nio.ByteBuffer b) |
Modifier and Type | Method and Description |
---|---|
protected int |
copy(int p,
byte[] b,
int o,
int n)
Copy bytes from the window to a caller supplied buffer.
|
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
ByteBufferWindow(PackFile pack, long o, java.nio.ByteBuffer 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.void write(PackOutputStream out, long pos, int cnt) throws java.io.IOException
write
in class ByteWindow
java.io.IOException
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.