@Public public interface DataInputView extends DataInput
MemorySegment
.Modifier and Type | Method and Description |
---|---|
int |
read(byte[] b)
Tries to fill the given byte array
b . |
int |
read(byte[] b,
int off,
int len)
Reads up to
len bytes of memory and stores it into b starting at offset
off . |
void |
skipBytesToRead(int numBytes)
Skips
numBytes bytes of memory. |
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes
void skipBytesToRead(int numBytes) throws IOException
numBytes
bytes of memory. In contrast to the DataInput.skipBytes(int)
method,
this method always skips the desired number of bytes or throws an EOFException
.numBytes
- The number of bytes to skip.IOException
- Thrown, if any I/O related problem occurred such that the input could not
be advanced to the desired position.int read(byte[] b, int off, int len) throws IOException
len
bytes of memory and stores it into b
starting at offset
off
.
If len
is zero, then no bytes are read and 0
is returned;
otherwise, there is an attempt to read at least one byte. If there is no more data left, the
value -1
is returned; otherwise, at least one byte is read and stored into
b
.
b
- byte array to store the data tooff
- offset into byte arraylen
- byte length to readIOException
int read(byte[] b) throws IOException
b
. Returns the actually number of read bytes or -1
if there is no more data.b
- byte array to store the data toIOException
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.