|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jgit.lib.ObjectInserter
org.eclipse.jgit.storage.dfs.DfsInserter
public class DfsInserter
Inserts objects into the DFS.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.eclipse.jgit.lib.ObjectInserter |
---|
ObjectInserter.Filter, ObjectInserter.Formatter |
Constructor Summary | |
---|---|
protected |
DfsInserter(DfsObjDatabase db)
Initialize a new inserter. |
Method Summary | |
---|---|
void |
flush()
Make all inserted objects visible. |
ObjectId |
insert(int type,
byte[] data,
int off,
int len)
Insert a single object into the store, returning its unique name. |
ObjectId |
insert(int type,
long len,
InputStream in)
Insert a single object into the store, returning its unique name. |
DfsPackParser |
newPackParser(InputStream in)
Initialize a parser to read from a pack formatted stream. |
void |
release()
Release any resources used by this inserter. |
Methods inherited from class org.eclipse.jgit.lib.ObjectInserter |
---|
buffer, digest, idFor, idFor, idFor, idFor, insert, insert, insert, insert |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected DfsInserter(DfsObjDatabase db)
db
- database the inserter writes to.Method Detail |
---|
public DfsPackParser newPackParser(InputStream in) throws IOException
ObjectInserter
newPackParser
in class ObjectInserter
in
- the input stream. The stream is not closed by the parser, and
must instead be closed by the caller once parsing is complete.
IOException
- the parser instance, which can be configured and then used to
parse objects into the ObjectDatabase.public ObjectId insert(int type, byte[] data, int off, int len) throws IOException
ObjectInserter
insert
in class ObjectInserter
type
- type code of the object to store.data
- complete content of the object.off
- first position within data
.len
- number of bytes to copy from data
.
IOException
- the object could not be stored.public ObjectId insert(int type, long len, InputStream in) throws IOException
ObjectInserter
insert
in class ObjectInserter
type
- type code of the object to store.len
- number of bytes to copy from in
.in
- stream providing the object content. The caller is responsible
for closing the stream.
IOException
- the object could not be stored, or the source stream could
not be read.public void flush() throws IOException
ObjectInserter
The flush may take some period of time to make the objects available to other threads.
flush
in class ObjectInserter
IOException
- the flush could not be completed; objects inserted thus far
are in an indeterminate state.public void release()
ObjectInserter
An inserter that has been released can be used again, but may need to be released after the subsequent usage.
release
in class ObjectInserter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |