@ExperimentalApi public abstract class ByteInput extends Object
| Constructor and Description |
|---|
ByteInput() |
| Modifier and Type | Method and Description |
|---|---|
abstract byte |
read(int offset)
Reads a single byte from the given offset.
|
int |
read(int offset,
byte[] b)
Reads bytes of data from the given offset into an array of bytes.
|
abstract int |
read(int offset,
byte[] out,
int outOffset,
int len)
Reads up to
len bytes of data from the given offset into an array of bytes. |
abstract int |
read(int offset,
ByteBuffer out)
Reads bytes of data from the given offset into given
ByteBuffer. |
abstract int |
size() |
public abstract byte read(int offset)
offset - The offset from where byte to be readpublic int read(int offset,
byte[] b)
throws IOException
offset - The src offset within this ByteInput from where data to be read.out - Destination byte array to read data into.IOExceptionpublic abstract int read(int offset,
byte[] out,
int outOffset,
int len)
len bytes of data from the given offset into an array of bytes.offset - The src offset within this ByteInput from where data to be read.out - Destination byte array to read data into.outOffset - Offset within the the out byte[] where data to be read into.len - The number of bytes to read.public abstract int read(int offset,
ByteBuffer out)
ByteBuffer.offset - he src offset within this ByteInput from where data to be read.out - Destination ByteBuffer to read data into.public abstract int size()
Copyright © 2017–2020 The Apache Software Foundation. All rights reserved.