Class DfsInserter.PackStream
java.lang.Object
java.io.OutputStream
org.eclipse.jgit.internal.storage.dfs.DfsInserter.PackStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
- Enclosing class:
DfsInserter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
(package private) final DeflaterOutputStream
(package private) final CRC32
private byte[]
private long
private int
private final Deflater
(package private) final byte[]
private final MessageDigest
private final DfsOutputStream
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
beginObject
(int objectType, long length) void
close()
private byte[]
copyOf
(byte[] src, int ptr, int cnt) private int
encodeTypeSize
(int type, long rawLength) private void
(package private) long
getCount()
private DfsBlock
getOrLoadBlock
(long pos) (package private) byte[]
(package private) int
read
(long pos, byte[] dst, int ptr, int cnt) private int
private long
toBlockStart
(long pos) void
write
(byte[] data, int off, int len) void
write
(int b) private void
writeNoHash
(byte[] data, int off, int len) (package private) byte[]
Methods inherited from class java.io.OutputStream
flush, write
-
Field Details
-
out
-
md
-
hdrBuf
final byte[] hdrBuf -
deflater
-
blockSize
private final int blockSize -
currPos
private long currPos -
currPtr
private int currPtr -
currBuf
private byte[] currBuf -
crc32
-
compress
-
-
Constructor Details
-
PackStream
PackStream(DfsOutputStream out)
-
-
Method Details
-
getCount
long getCount() -
beginObject
- Throws:
IOException
-
encodeTypeSize
private int encodeTypeSize(int type, long rawLength) -
write
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
writeNoHash
- Throws:
IOException
-
flushBlock
- Throws:
IOException
-
copyOf
private byte[] copyOf(byte[] src, int ptr, int cnt) -
read
- Throws:
IOException
-
inflate
- Throws:
IOException
DataFormatException
-
setInput
- Throws:
IOException
DataFormatException
-
getOrLoadBlock
- Throws:
IOException
-
toBlockStart
private long toBlockStart(long pos) -
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-