org.eclipse.jgit.storage.pack
Class StoredObjectRepresentation

java.lang.Object
  extended by org.eclipse.jgit.storage.pack.StoredObjectRepresentation

public class StoredObjectRepresentation
extends Object

An object representation PackWriter can consider for packing.


Field Summary
static int FORMAT_OTHER
          Only available after inflating to canonical format.
static int PACK_DELTA
          Stored in pack format, as a delta to another object.
static int PACK_WHOLE
          Stored in pack format, without delta.
static int WEIGHT_UNKNOWN
          Special unknown value for getWeight().
 
Constructor Summary
StoredObjectRepresentation()
           
 
Method Summary
 ObjectId getDeltaBase()
           
 int getFormat()
           
 int getWeight()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WEIGHT_UNKNOWN

public static final int WEIGHT_UNKNOWN
Special unknown value for getWeight().

See Also:
Constant Field Values

PACK_DELTA

public static final int PACK_DELTA
Stored in pack format, as a delta to another object.

See Also:
Constant Field Values

PACK_WHOLE

public static final int PACK_WHOLE
Stored in pack format, without delta.

See Also:
Constant Field Values

FORMAT_OTHER

public static final int FORMAT_OTHER
Only available after inflating to canonical format.

See Also:
Constant Field Values
Constructor Detail

StoredObjectRepresentation

public StoredObjectRepresentation()
Method Detail

getWeight

public int getWeight()
Returns:
relative size of this object's packed form. The special value WEIGHT_UNKNOWN can be returned to indicate the implementation doesn't know, or cannot supply the weight up front.

getFormat

public int getFormat()
Returns:
true if this is a delta against another object and this is stored in pack delta format.

getDeltaBase

public ObjectId getDeltaBase()
Returns:
identity of the object this delta applies to in order to recover the original object content. This method should only be called if getFormat() returned PACK_DELTA.


Copyright © 2012. All Rights Reserved.