@InterfaceAudience.Public
@InterfaceStability.Evolving
public interface ByteBufferReadable
Modifier and Type | Method and Description |
---|---|
int |
read(ByteBuffer buf)
Reads up to buf.remaining() bytes into buf.
|
int read(ByteBuffer buf) throws IOException
UnsupportedOperationException
, so
callers that are not confident in support for this method from the
underlying filesystem should be prepared to handle that exception.
Implementations should treat 0-length requests as legitimate, and must not
signal an error upon their receipt.buf
- the ByteBuffer to receive the results of the read operation.IOException
- if there is some error performing the readCopyright © 2019 Apache Software Foundation. All rights reserved.