Class UnpackedObject
java.lang.Object
org.eclipse.jgit.internal.storage.file.UnpackedObject
Loose object loader. This class loads an object not stored in a pack.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static BufferedInputStream
buffer
(InputStream in) (package private) static void
checkValidEndOfStream
(InputStream in, Inflater inf, AnyObjectId id, byte[] buf) (package private) static long
getSize
(InputStream in, AnyObjectId id, WindowCursor wc) (package private) static InputStream
inflate
(InputStream in, long size, ObjectId id) private static InflaterInputStream
inflate
(InputStream in, Inflater inf) (package private) static boolean
isStandardFormat
(byte[] hdr) (package private) static ObjectLoader
open
(InputStream in, 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
(InputStream in, byte[] hdr, int off, int cnt)
-
Field Details
-
BUFFER_SIZE
private static final int BUFFER_SIZE- See Also:
-
-
Constructor Details
-
UnpackedObject
public UnpackedObject()
-
-
Method Details
-
parse
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:
IOException
- the object cannot be parsed.
-
open
static ObjectLoader open(InputStream in, File path, AnyObjectId id, WindowCursor wc) throws IOException - Throws:
IOException
-
getSize
- Throws:
IOException
-
checkValidEndOfStream
static void checkValidEndOfStream(InputStream in, Inflater inf, AnyObjectId id, byte[] buf) throws IOException, CorruptObjectException - Throws:
IOException
CorruptObjectException
-
isStandardFormat
static boolean isStandardFormat(byte[] hdr) -
inflate
-
inflate
-
buffer
-
readSome
- Throws:
IOException
-