Class DfsBlock
- java.lang.Object
-
- org.eclipse.jgit.internal.storage.dfs.DfsBlock
-
final class DfsBlock extends java.lang.Object
A cached slice of aBlockBasedFile
.
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]
block
(package private) long
end
(package private) long
start
(package private) DfsStreamKey
stream
-
Constructor Summary
Constructors Constructor Description DfsBlock(DfsStreamKey p, long pos, byte[] buf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
check(java.util.zip.Inflater inf, byte[] tmp, long pos, int cnt)
(package private) boolean
contains(DfsStreamKey want, long pos)
(package private) int
copy(int p, byte[] b, int o, int n)
(package private) int
copy(long pos, byte[] dstbuf, int dstoff, int cnt)
(package private) void
crc32(java.util.zip.CRC32 out, long pos, int cnt)
(package private) int
setInput(long pos, java.util.zip.Inflater inf)
(package private) int
size()
(package private) void
write(PackOutputStream out, long pos, int cnt)
(package private) java.nio.ByteBuffer
zeroCopyByteBuffer(int n)
-
-
-
Field Detail
-
stream
final DfsStreamKey stream
-
start
final long start
-
end
final long end
-
block
private final byte[] block
-
-
Constructor Detail
-
DfsBlock
DfsBlock(DfsStreamKey p, long pos, byte[] buf)
-
-
Method Detail
-
size
int size()
-
zeroCopyByteBuffer
java.nio.ByteBuffer zeroCopyByteBuffer(int n)
-
contains
boolean contains(DfsStreamKey want, long pos)
-
copy
int copy(long pos, byte[] dstbuf, int dstoff, int cnt)
-
copy
int copy(int p, byte[] b, int o, int n)
-
setInput
int setInput(long pos, java.util.zip.Inflater inf) throws java.util.zip.DataFormatException
- Throws:
java.util.zip.DataFormatException
-
crc32
void crc32(java.util.zip.CRC32 out, long pos, int cnt)
-
write
void write(PackOutputStream out, long pos, int cnt) throws java.io.IOException
- Throws:
java.io.IOException
-
check
void check(java.util.zip.Inflater inf, byte[] tmp, long pos, int cnt) throws java.util.zip.DataFormatException
- Throws:
java.util.zip.DataFormatException
-
-