Class UnpackedObject
- java.lang.Object
-
- org.eclipse.jgit.internal.storage.file.UnpackedObject
-
public class UnpackedObject extends java.lang.Object
Loose object loader. This class loads an object not stored in a pack.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
UnpackedObject.LargeObject
-
Field Summary
Fields Modifier and Type Field Description private static int
BUFFER_SIZE
-
Constructor Summary
Constructors Constructor Description UnpackedObject()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static java.io.BufferedInputStream
buffer(java.io.InputStream in)
(package private) static void
checkValidEndOfStream(java.io.InputStream in, java.util.zip.Inflater inf, AnyObjectId id, byte[] buf)
(package private) static long
getSize(java.io.InputStream in, AnyObjectId id, WindowCursor wc)
(package private) static java.io.InputStream
inflate(java.io.InputStream in, long size, ObjectId id)
private static java.util.zip.InflaterInputStream
inflate(java.io.InputStream in, java.util.zip.Inflater inf)
(package private) static boolean
isStandardFormat(byte[] hdr)
(package private) static ObjectLoader
open(java.io.InputStream in, java.io.File path, AnyObjectId id, WindowCursor wc)
static ObjectLoader
parse(byte[] raw, AnyObjectId id)
Parse an object from the unpacked object format.(package private) static int
readSome(java.io.InputStream in, byte[] hdr, int off, int cnt)
-
-
-
Field Detail
-
BUFFER_SIZE
private static final int BUFFER_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
parse
public static ObjectLoader parse(byte[] raw, AnyObjectId id) throws java.io.IOException
Parse an object from the unpacked object format.- Parameters:
raw
- complete contents of the compressed object.id
- expected ObjectId of the object, used only for error reporting in exceptions.- Returns:
- loader to read the inflated contents.
- Throws:
java.io.IOException
- the object cannot be parsed.
-
open
static ObjectLoader open(java.io.InputStream in, java.io.File path, AnyObjectId id, WindowCursor wc) throws java.io.IOException
- Throws:
java.io.IOException
-
getSize
static long getSize(java.io.InputStream in, AnyObjectId id, WindowCursor wc) throws java.io.IOException
- Throws:
java.io.IOException
-
checkValidEndOfStream
static void checkValidEndOfStream(java.io.InputStream in, java.util.zip.Inflater inf, AnyObjectId id, byte[] buf) throws java.io.IOException, CorruptObjectException
- Throws:
java.io.IOException
CorruptObjectException
-
isStandardFormat
static boolean isStandardFormat(byte[] hdr)
-
inflate
static java.io.InputStream inflate(java.io.InputStream in, long size, ObjectId id)
-
inflate
private static java.util.zip.InflaterInputStream inflate(java.io.InputStream in, java.util.zip.Inflater inf)
-
buffer
static java.io.BufferedInputStream buffer(java.io.InputStream in)
-
readSome
static int readSome(java.io.InputStream in, byte[] hdr, int off, int cnt) throws java.io.IOException
- Throws:
java.io.IOException
-
-