Package org.eclipse.jgit.diff
Class ContentSource.WorkingTreeSource
- java.lang.Object
-
- org.eclipse.jgit.diff.ContentSource
-
- org.eclipse.jgit.diff.ContentSource.WorkingTreeSource
-
- Enclosing class:
- ContentSource
private static class ContentSource.WorkingTreeSource extends ContentSource
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jgit.diff.ContentSource
ContentSource.Pair
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
current
private WorkingTreeIterator
iterator
(package private) WorkingTreeIterator
ptr
private TreeWalk
tw
-
Constructor Summary
Constructors Constructor Description WorkingTreeSource(WorkingTreeIterator iterator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectLoader
open(java.lang.String path, ObjectId id)
Open the object.private void
seek(java.lang.String path)
long
size(java.lang.String path, ObjectId id)
Determine the size of the object.-
Methods inherited from class org.eclipse.jgit.diff.ContentSource
create, create
-
-
-
-
Field Detail
-
tw
private final TreeWalk tw
-
iterator
private final WorkingTreeIterator iterator
-
current
private java.lang.String current
-
ptr
WorkingTreeIterator ptr
-
-
Constructor Detail
-
WorkingTreeSource
WorkingTreeSource(WorkingTreeIterator iterator)
-
-
Method Detail
-
size
public long size(java.lang.String path, ObjectId id) throws java.io.IOException
Description copied from class:ContentSource
Determine the size of the object.- Specified by:
size
in classContentSource
- Parameters:
path
- the path of the file, relative to the root of the repository.id
- blob id of the file, if known.- Returns:
- the size in bytes.
- Throws:
java.io.IOException
- the file cannot be accessed.
-
open
public ObjectLoader open(java.lang.String path, ObjectId id) throws java.io.IOException
Description copied from class:ContentSource
Open the object.- Specified by:
open
in classContentSource
- Parameters:
path
- the path of the file, relative to the root of the repository.id
- blob id of the file, if known.- Returns:
- a loader that can supply the content of the file. The loader must be used before another loader can be obtained from this same source.
- Throws:
java.io.IOException
- the file cannot be accessed.
-
seek
private void seek(java.lang.String path) throws java.io.IOException
- Throws:
java.io.IOException
-
-