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 CRC32private byte[]private longprivate intprivate final Deflater(package private) final byte[]private final MessageDigestprivate final DfsOutputStream -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidbeginObject(int objectType, long length) voidclose()private byte[]copyOf(byte[] src, int ptr, int cnt) private intencodeTypeSize(int type, long rawLength) private void(package private) longgetCount()private DfsBlockgetOrLoadBlock(long pos) (package private) byte[](package private) intread(long pos, byte[] dst, int ptr, int cnt) private intprivate longtoBlockStart(long pos) voidwrite(byte[] data, int off, int len) voidwrite(int b) private voidwriteNoHash(byte[] data, int off, int len) (package private) byte[]Methods inherited from class java.io.OutputStream
flush, nullOutputStream, 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:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
writeNoHash
- Throws:
IOException
-
flushBlock
- Throws:
IOException
-
copyOf
private byte[] copyOf(byte[] src, int ptr, int cnt) -
read
- Throws:
IOException
-
inflate
- Throws:
IOExceptionDataFormatException
-
setInput
- Throws:
IOExceptionDataFormatException
-
getOrLoadBlock
- Throws:
IOException
-
toBlockStart
private long toBlockStart(long pos) -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-