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
. It returns the number of read bytes or -1 if there is no more data left.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 © 2023–2024 The Apache Software Foundation. All rights reserved.