public class LfsPointer extends Object
Modifier and Type | Field and Description |
---|---|
static String |
HASH_FUNCTION_NAME
The name of the hash function as used in the pointer files.
|
static String |
VERSION
The version of the LfsPointer file format
|
static String |
VERSION_LEGACY
The version of the LfsPointer file format using legacy URL
|
Constructor and Description |
---|
LfsPointer(AnyLongObjectId oid,
long size) |
Modifier and Type | Method and Description |
---|---|
void |
encode(OutputStream out)
Encode this object into the LFS format defined by
VERSION |
AnyLongObjectId |
getOid() |
long |
getSize() |
static LfsPointer |
parseLfsPointer(InputStream in)
Try to parse the data provided by an InputStream to the format defined by
VERSION |
String |
toString() |
public static final String VERSION
public static final String VERSION_LEGACY
public static final String HASH_FUNCTION_NAME
public LfsPointer(AnyLongObjectId oid, long size)
oid
- the id of the contentsize
- the size of the contentpublic AnyLongObjectId getOid()
public long getSize()
public void encode(OutputStream out)
VERSION
out
- the OutputStream
into which the encoded data should be
written@Nullable public static LfsPointer parseLfsPointer(InputStream in) throws IOException
VERSION
in
- the InputStream
from where to read the dataLfsPointer
or null
if the stream was not
parseable as LfsPointerIOException
Copyright © 2017 Eclipse JGit Project. All rights reserved.