public abstract class DfsOutputStream
extends java.io.OutputStream
| Constructor and Description |
|---|
DfsOutputStream() |
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 java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic abstract void write(byte[] buf,
int off,
int len)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic abstract int read(long position,
java.nio.ByteBuffer buf)
throws java.io.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.java.io.IOException - reading is not supported, or the read cannot be performed due
to DFS errors.Copyright © 2012. All Rights Reserved.