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 BufferedInputStreambuffer(InputStream in) (package private) static voidcheckValidEndOfStream(InputStream in, Inflater inf, AnyObjectId id, byte[] buf) (package private) static longgetSize(InputStream in, AnyObjectId id, WindowCursor wc) (package private) static InputStreaminflate(InputStream in, long size, ObjectId id) private static InflaterInputStreaminflate(InputStream in, Inflater inf) (package private) static booleanisStandardFormat(byte[] hdr) (package private) static ObjectLoaderopen(InputStream in, File path, AnyObjectId id, WindowCursor wc) static ObjectLoaderparse(byte[] raw, AnyObjectId id) Parse an object from the unpacked object format.(package private) static intreadSome(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:
IOExceptionCorruptObjectException
-
isStandardFormat
static boolean isStandardFormat(byte[] hdr) -
inflate
-
inflate
-
buffer
-
readSome
- Throws:
IOException
-