Top Description Fields Constructors Methods
org.eclipse.jgit.lfs.server.fs

public Class FileLfsRepository

extends Object
implements LargeFileRepository
Class Inheritance
All Implemented Interfaces
org.eclipse.jgit.lfs.server.LargeFileRepository
Static Imports
org.eclipse.jgit.util.HttpSupport.HDR_AUTHORIZATION

Repository storing large objects in the file system
Since
4.3

Field Summary

Modifier and TypeField and Description
private final Path
private static final char[]
private String

Constructor Summary

AccessConstructor and Description
public
FileLfsRepository(String
external URL of this repository
url
,
Path
storage directory
dir
)

Constructor for FileLfsRepository.

Method Summary

Modifier and TypeMethod and Description
private static void
formatHexChar(char[] dst, int p, int b)

private Response.Action
public Path

Returns:

the path of the storage directory
getDir
()

Get the storage directory

public Response.Action
getDownloadAction(AnyLongObjectId
id of the object to download
id
)

Implements org.eclipse.jgit.lfs.server.LargeFileRepository.getDownloadAction.

Get download action

pack-priv AtomicObjectOutputStream
protected Path

Returns:

path the object's storage path
getPath
(AnyLongObjectId
id of a large object
id
)

Get the path where the given object is stored

pack-priv ReadableByteChannel
public long
getSize(AnyLongObjectId
id of the object
id
)

Implements org.eclipse.jgit.lfs.server.LargeFileRepository.getSize.

Get size of an object

public Response.Action
getUploadAction(AnyLongObjectId
id of the object to upload
id
,
long
size of the object to be uploaded
size
)

Implements org.eclipse.jgit.lfs.server.LargeFileRepository.getUploadAction.

Get upload action

public String

Returns:

the url of the content server
getUrl
()

Get URL of content server

public Response.Action
getVerifyAction(AnyLongObjectId
id of the object to be verified
id
)

Implements org.eclipse.jgit.lfs.server.LargeFileRepository.getVerifyAction.

Get verify action

public void
setUrl(String
the url of the content server
url
)

Set the URL of the content server

private static char[]
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

dirback to summary
private final Path dir
hexcharback to summary
private static final char[] hexchar
urlback to summary
private String url

Constructor Detail

FileLfsRepositoryback to summary
public FileLfsRepository(String url, Path dir) throws IOException

Constructor for FileLfsRepository.

Parameters
url:String

external URL of this repository

dir:Path

storage directory

Exceptions
IOException:
if an IO error occurred

Method Detail

formatHexCharback to summary
private static void formatHexChar(char[] dst, int p, int b)
getActionback to summary
private Response.Action getAction(AnyLongObjectId id)
getDirback to summary
public Path getDir()

Get the storage directory

Returns:Path

the path of the storage directory

getDownloadActionback to summary
public Response.Action getDownloadAction(AnyLongObjectId id)

Implements org.eclipse.jgit.lfs.server.LargeFileRepository.getDownloadAction.

Doc from org.eclipse.jgit.lfs.server.LargeFileRepository.getDownloadAction.

Get download action

Parameters
id:AnyLongObjectId

id of the object to download

Returns:Response.Action

Action for downloading the object

Annotations
@Override
getOutputStreamback to summary
pack-priv AtomicObjectOutputStream getOutputStream(AnyLongObjectId id) throws IOException
getPathback to summary
protected Path getPath(AnyLongObjectId id)

Get the path where the given object is stored

Parameters
id:AnyLongObjectId

id of a large object

Returns:Path

path the object's storage path

getReadChannelback to summary
pack-priv ReadableByteChannel getReadChannel(AnyLongObjectId id) throws IOException
getSizeback to summary
public long getSize(AnyLongObjectId id) throws IOException

Implements org.eclipse.jgit.lfs.server.LargeFileRepository.getSize.

Doc from org.eclipse.jgit.lfs.server.LargeFileRepository.getSize.

Get size of an object

Parameters
id:AnyLongObjectId

id of the object

Returns:long

length of the object content in bytes, -1 if the object doesn't exist

Annotations
@Override
Exceptions
IOException:
if an IO error occurred
getUploadActionback to summary
public Response.Action getUploadAction(AnyLongObjectId id, long size)

Implements org.eclipse.jgit.lfs.server.LargeFileRepository.getUploadAction.

Doc from org.eclipse.jgit.lfs.server.LargeFileRepository.getUploadAction.

Get upload action

Parameters
id:AnyLongObjectId

id of the object to upload

size:long

size of the object to be uploaded

Returns:Response.Action

Action for uploading the object

Annotations
@Override
getUrlback to summary
public String getUrl()

Get URL of content server

Returns:String

the url of the content server

Since
4.11
getVerifyActionback to summary
public Response.Action getVerifyAction(AnyLongObjectId id)

Implements org.eclipse.jgit.lfs.server.LargeFileRepository.getVerifyAction.

Doc from org.eclipse.jgit.lfs.server.LargeFileRepository.getVerifyAction.

Get verify action

Parameters
id:AnyLongObjectId

id of the object to be verified

Returns:Response.Action

Action for verifying the object, or null if the server doesn't support or require verification

Annotations
@Override
@Nullable
setUrlback to summary
public void setUrl(String url)

Set the URL of the content server

Parameters
url:String

the url of the content server

Since
4.11
toHexCharArrayback to summary
private static char[] toHexCharArray(int b)