|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
org.eclipse.jgit.storage.dfs.DfsOutputStream
public abstract class DfsOutputStream
Output stream to create a file on the DFS.
DfsObjDatabase.writePackFile(DfsPackDescription),
DfsObjDatabase.writePackIndex(DfsPackDescription)| Constructor Summary | |
|---|---|
DfsOutputStream()
|
|
| Method Summary | |
|---|---|
int |
blockSize()
Get the recommended alignment for writing. |
abstract int |
read(long position,
ByteBuffer buf)
Read back a portion of already written data. |
abstract void |
write(byte[] buf,
int off,
int len)
|
void |
write(int b)
|
| Methods inherited from class java.io.OutputStream |
|---|
close, flush, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DfsOutputStream()
| Method Detail |
|---|
public int blockSize()
Starting a write at multiples of the blockSize is more efficient than starting a write at any other position. If 0 or -1 the channel does not have any specific block size recommendation.
Channels should not recommend large block sizes. Sizes up to 1-4 MiB may be reasonable, but sizes above that may be horribly inefficient.
public void write(int b)
throws IOException
write in class OutputStreamIOException
public abstract void write(byte[] buf,
int off,
int len)
throws IOException
write in class OutputStreamIOException
public abstract int read(long position,
ByteBuffer buf)
throws IOException
The writing position of the output stream is not affected by a read.
position - offset to read from.buf - buffer to populate. Up to buf.remaining() bytes will
be read from position.
IOException - reading is not supported, or the read cannot be performed due
to DFS errors.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||