private abstract static class InMemoryRepository.Out extends DfsOutputStream
| Modifier and Type | Field and Description |
|---|---|
private byte[] |
data |
private java.io.ByteArrayOutputStream |
dst |
| Modifier | Constructor and Description |
|---|---|
private |
Out() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
abstract void |
flush() |
(package private) byte[] |
getData() |
int |
read(long position,
java.nio.ByteBuffer buf)
Read back a portion of already written data.
|
void |
write(byte[] buf,
int off,
int len) |
blockSize, writepublic void write(byte[] buf,
int off,
int len)
DfsOutputStreamwrite in class DfsOutputStreampublic int read(long position,
java.nio.ByteBuffer buf)
DfsOutputStreamThe writing position of the output stream is not affected by a read.
read in class DfsOutputStreamposition - offset to read from.buf - buffer to populate. Up to buf.remaining() bytes will
be read from position.byte[] getData()
public abstract void flush()
flush in interface java.io.Flushableflush in class java.io.OutputStreampublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStream