Class ByteArrayWindow
java.lang.Object
org.eclipse.jgit.internal.storage.file.ByteWindow
org.eclipse.jgit.internal.storage.file.ByteArrayWindow
A
ByteWindow with an underlying byte array for storage.-
Field Summary
FieldsFields inherited from class org.eclipse.jgit.internal.storage.file.ByteWindow
end, pack, start -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidprotected intcopy(int p, byte[] b, int o, int n) Copy bytes from the window to a caller supplied buffer.(package private) voidprotected intSet the input(package private) voidwrite(PackOutputStream out, long pos, int cnt) Methods inherited from class org.eclipse.jgit.internal.storage.file.ByteWindow
contains, copy, setInput, size
-
Field Details
-
array
private final byte[] array
-
-
Constructor Details
-
ByteArrayWindow
ByteArrayWindow(Pack pack, long o, byte[] b)
-
-
Method Details
-
copy
protected int copy(int p, byte[] b, int o, int n) Copy bytes from the window to a caller supplied buffer.- Specified by:
copyin classByteWindow- Parameters:
p- offset within the window to start copying from.b- destination buffer to copy into.o- offset withindstbufto start copying into.n- number of bytes to copy. This value may exceed the number of bytes remaining in the window starting at offsetpos.- Returns:
- number of bytes actually copied; this may be less than
cntifcntexceeded the number of bytes available.
-
setInput
Set the input- Specified by:
setInputin classByteWindow- Parameters:
pos- positioninf- anInflaterobject.- Returns:
- size of the byte window
- Throws:
DataFormatException- if any.
-
crc32
-
write
- Specified by:
writein classByteWindow- Throws:
IOException
-
check
- Throws:
DataFormatException
-