private static class ContentSource.ObjectReaderSource extends ContentSource
ContentSource.Pair
Modifier and Type | Field and Description |
---|---|
private ObjectReader |
reader |
Constructor and Description |
---|
ObjectReaderSource(ObjectReader reader) |
Modifier and Type | Method and Description |
---|---|
ObjectLoader |
open(java.lang.String path,
ObjectId id)
Open the object.
|
long |
size(java.lang.String path,
ObjectId id)
Determine the size of the object.
|
create, create
private final ObjectReader reader
ObjectReaderSource(ObjectReader reader)
public long size(java.lang.String path, ObjectId id) throws java.io.IOException
ContentSource
size
in class ContentSource
path
- the path of the file, relative to the root of the repository.id
- blob id of the file, if known.java.io.IOException
- the file cannot be accessed.public ObjectLoader open(java.lang.String path, ObjectId id) throws java.io.IOException
ContentSource
open
in class ContentSource
path
- the path of the file, relative to the root of the repository.id
- blob id of the file, if known.java.io.IOException
- the file cannot be accessed.