Top Description Fields Constructors Methods
org.eclipse.jgit.internal.storage.file

pack-priv final Class ByteBufferWindow

extends ByteWindow
Class Inheritance
Imports
java.io.IOException, java.nio.ByteBuffer, java.util.zip.DataFormatException, .Inflater, org.eclipse.jgit.internal.storage.pack.PackOutputStream

A window for accessing git packs using a ByteBuffer for storage.
See Also
ByteWindow

Field Summary

Modifier and TypeField and Description
private final ByteBuffer
Inherited from org.eclipse.jgit.internal.storage.file.ByteWindow:
endpackstart

Constructor Summary

AccessConstructor and Description
pack-priv
ByteBufferWindow(Pack pack, long o, ByteBuffer b)

Method Summary

Modifier and TypeMethod and Description
protected int
copy(int
offset within the window to start copying from.
p
,
byte[]
destination buffer to copy into.
b
,
int
offset within dstbuf to start copying into.
o
,
int
number of bytes to copy. This value may exceed the number of bytes remaining in the window starting at offset pos.
n
)

Implements abstract org.eclipse.jgit.internal.storage.file.ByteWindow.copy.

Copy bytes from the window to a caller supplied buffer.

protected int
setInput(int
position
pos
,
Inflater inf)

Implements abstract org.eclipse.jgit.internal.storage.file.ByteWindow.setInput.

Set the input

pack-priv void
Inherited from org.eclipse.jgit.internal.storage.file.ByteWindow:
containscopysetInputsize

Field Detail

bufferback to summary
private final ByteBuffer buffer

Constructor Detail

ByteBufferWindowback to summary
pack-priv ByteBufferWindow(Pack pack, long o, ByteBuffer b)

Method Detail

copyback to summary
protected int copy(int p, byte[] b, int o, int n)

Implements abstract org.eclipse.jgit.internal.storage.file.ByteWindow.copy.

Doc from org.eclipse.jgit.internal.storage.file.ByteWindow.copy.

Copy bytes from the window to a caller supplied buffer.

Parameters
p:int

offset within the window to start copying from.

b:byte[]

destination buffer to copy into.

o:int

offset within dstbuf to start copying into.

n:int

number of bytes to copy. This value may exceed the number of bytes remaining in the window starting at offset pos.

Returns:int

number of bytes actually copied; this may be less than cnt if cnt exceeded the number of bytes available.

Annotations
@Override
setInputback to summary
protected int setInput(int pos, Inflater inf) throws DataFormatException

Implements abstract org.eclipse.jgit.internal.storage.file.ByteWindow.setInput.

Doc from org.eclipse.jgit.internal.storage.file.ByteWindow.setInput.

Set the input

Parameters
pos:int

position

inf:Inflater

an java.util.zip.Inflater object.

Returns:int

size of the byte window

Annotations
@Override
Exceptions
DataFormatException:
if any.
writeback to summary
pack-priv void write(PackOutputStream out, long pos, int cnt) throws IOException

Implements abstract org.eclipse.jgit.internal.storage.file.ByteWindow.write.

Annotations
@Override