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, write
public void write(byte[] buf, int off, int len)
DfsOutputStream
write
in class DfsOutputStream
public int read(long position, java.nio.ByteBuffer buf)
DfsOutputStream
The writing position of the output stream is not affected by a read.
read
in class DfsOutputStream
position
- 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.Flushable
flush
in class java.io.OutputStream
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.OutputStream