Top Description Constructors Methods
org.eclipse.jgit.lib

public Class BlobBasedConfig

extends Config
Class Inheritance
Static Imports
java.nio.charset.StandardCharsets.UTF_8

Configuration file based on the blobs stored in the repository. This implementation currently only provides reading support, and is primarily useful for supporting the .gitmodules file.

Constructor Summary

AccessConstructor and Description
public
BlobBasedConfig(Config
the base configuration file
base
,
byte[]
the byte array, should be UTF-8 encoded text.
blob
)

Parse a configuration from a byte array.

public
BlobBasedConfig(Config
the base configuration file
base
,
Repository
the repository
db
,
AnyObjectId
the object identifier
objectId
)

Load a configuration file from a blob.

public
BlobBasedConfig(Config
the base configuration file
base
,
Repository
the repository containing the objects.
db
,
AnyObjectId
the tree (or commit) that contains the object
treeish
,
String
the path within the tree
path
)

Load a configuration file from a blob stored in a specific commit.

Method Summary

Modifier and TypeMethod and Description
private static AnyObjectId
private static byte[]
private static byte[]
private static byte[]
read(Repository db, AnyObjectId treeish, String path)

Inherited from org.eclipse.jgit.lib.Config:
addChangeListenerclearescapeSubsectionescapeValuefireConfigChangedEventfromTextgetgetBaseConfiggetBooleangetBooleangetBooleangetBooleangetEnumgetEnumgetEnumgetIntgetIntgetIntgetIntgetIntInRangegetIntInRangegetIntInRangegetIntInRangegetLonggetLonggetLonggetLonggetNamesgetNamesgetNamesgetNamesgetPathgetRefSpecsgetSectionsgetStringgetStringListgetSubsectionsgetTimeUnitgetTimeUnitisMissingisUtf8notifyUponTransientChangesreadIncludedConfigremoveSectionsetBooleansetEnumsetIntsetLongsetStringsetStringListsetTypedConfigGettertoTextuncacheunsetunsetSection

Constructor Detail

BlobBasedConfigback to summary
public BlobBasedConfig(Config base, byte[] blob) throws ConfigInvalidException

Parse a configuration from a byte array.

Parameters
base:Config

the base configuration file

blob:byte[]

the byte array, should be UTF-8 encoded text.

Exceptions
ConfigInvalidException:
the byte array is not a valid configuration format.
BlobBasedConfigback to summary
public BlobBasedConfig(Config base, Repository db, AnyObjectId objectId) throws IOException, ConfigInvalidException

Load a configuration file from a blob.

Parameters
base:Config

the base configuration file

db:Repository

the repository

objectId:AnyObjectId

the object identifier

Exceptions
IOException:
the blob cannot be read from the repository.
ConfigInvalidException:
the blob is not a valid configuration format.
BlobBasedConfigback to summary
public BlobBasedConfig(Config base, Repository db, AnyObjectId treeish, String path) throws FileNotFoundException, IOException, ConfigInvalidException

Load a configuration file from a blob stored in a specific commit.

Parameters
base:Config

the base configuration file

db:Repository

the repository containing the objects.

treeish:AnyObjectId

the tree (or commit) that contains the object

path:String

the path within the tree

Exceptions
FileNotFoundException:
the path does not exist in the commit's tree.
IOException:
the tree and/or blob cannot be accessed.
ConfigInvalidException:
the blob is not a valid configuration format.

Method Detail

asTreeback to summary
private static AnyObjectId asTree(ObjectReader or, AnyObjectId treeish) throws MissingObjectException, IncorrectObjectTypeException, IOException
readback to summary
private static byte[] read(Repository db, AnyObjectId blobId) throws MissingObjectException, IncorrectObjectTypeException, IOException
readback to summary
private static byte[] read(ObjectReader or, AnyObjectId blobId) throws MissingObjectException, IncorrectObjectTypeException, IOException
readback to summary
private static byte[] read(Repository db, AnyObjectId treeish, String path) throws MissingObjectException, IncorrectObjectTypeException, IOException