|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.jgit.lib.ObjectChecker
public class ObjectChecker
Verifies that an object is formatted correctly.
Verifications made by this class only check that the fields of an object are formatted correctly. The ObjectId checksum of the object is not verified, and connectivity links between objects are also not verified. Its assumed that the caller can provide both of these validations on its own.
Instances of this class are not thread safe, but they may be reused to perform multiple object validations.
Field Summary | |
---|---|
static byte[] |
author
Header "author " |
static byte[] |
committer
Header "committer " |
static byte[] |
encoding
Header "encoding " |
static byte[] |
object
Header "object " |
static byte[] |
parent
Header "parent " |
static byte[] |
tag
Header "tag " |
static byte[] |
tagger
Header "tagger " |
static byte[] |
tree
Header "tree " |
static byte[] |
type
Header "type " |
Constructor Summary | |
---|---|
ObjectChecker()
|
Method Summary | |
---|---|
void |
check(int objType,
byte[] raw)
Check an object for parsing errors. |
void |
checkBlob(byte[] raw)
Check a blob for errors. |
void |
checkCommit(byte[] raw)
Check a commit for errors. |
void |
checkTag(byte[] raw)
Check an annotated tag for errors. |
void |
checkTree(byte[] raw)
Check a canonical formatted tree for errors. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final byte[] tree
public static final byte[] parent
public static final byte[] author
public static final byte[] committer
public static final byte[] encoding
public static final byte[] object
public static final byte[] type
public static final byte[] tag
public static final byte[] tagger
Constructor Detail |
---|
public ObjectChecker()
Method Detail |
---|
public void check(int objType, byte[] raw) throws CorruptObjectException
objType
- type of the object. Must be a valid object type code in
Constants
.raw
- the raw data which comprises the object. This should be in the
canonical format (that is the format used to generate the
ObjectId of the object). The array is never modified.
CorruptObjectException
- if an error is identified.public void checkCommit(byte[] raw) throws CorruptObjectException
raw
- the commit data. The array is never modified.
CorruptObjectException
- if any error was detected.public void checkTag(byte[] raw) throws CorruptObjectException
raw
- the tag data. The array is never modified.
CorruptObjectException
- if any error was detected.public void checkTree(byte[] raw) throws CorruptObjectException
raw
- the raw tree data. The array is never modified.
CorruptObjectException
- if any error was detected.public void checkBlob(byte[] raw) throws CorruptObjectException
raw
- the blob data. The array is never modified.
CorruptObjectException
- if any error was detected.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |