ByteArrayInput
class instead.@Deprecated public class ByteArrayDataInput extends ByteArrayBuffer implements DataInput
ByteArrayDataInput
implements DataInput
interface
using byte array buffer.Modifier and Type | Class and Description |
---|---|
static class |
ByteArrayDataInput.EndOfBufferException
Deprecated.
This exception is thrown when attempt to read past limit is made.
|
buffer, limit, position
Constructor and Description |
---|
ByteArrayDataInput()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
expandLimit(int required_limit)
Deprecated.
This implementation throws
ByteArrayDataInput.EndOfBufferException |
protected int |
readAvailableBytes(int n)
Deprecated.
Makes an attempt to read
n bytes of data into the buffer. |
boolean |
readBoolean()
Deprecated.
|
byte |
readByte()
Deprecated.
|
char |
readChar()
Deprecated.
|
double |
readDouble()
Deprecated.
|
float |
readFloat()
Deprecated.
|
void |
readFully(byte[] b)
Deprecated.
|
void |
readFully(byte[] b,
int off,
int len)
Deprecated.
|
int |
readInt()
Deprecated.
|
String |
readLine()
Deprecated.
|
long |
readLong()
Deprecated.
|
short |
readShort()
Deprecated.
|
int |
readUnsignedByte()
Deprecated.
|
int |
readUnsignedShort()
Deprecated.
|
String |
readUTF()
Deprecated.
|
int |
skipBytes(int n)
Deprecated.
|
clear, copy, ensureCapacity, getBuffer, getLimit, getPosition, setBuffer, setLimit, setPosition
protected int readAvailableBytes(int n) throws IOException
n
bytes of data into the buffer.
This method may read smaller number of bytes (possibly zero) or larger
number of bytes depending on availability.
This method never throws an EOFException
.
The actual number of bytes read is returned.
This method is used by skipBytes(int)
and readLine()
methods instead of an expandLimit(int)
method.
The default implementation simply returns zero.
IOException
- if an I/O error occurs.public void readFully(byte[] b) throws IOException
readFully
in interface DataInput
IOException
public void readFully(byte[] b, int off, int len) throws IOException
readFully
in interface DataInput
IOException
public int skipBytes(int n) throws IOException
skipBytes
in interface DataInput
IOException
public boolean readBoolean() throws IOException
readBoolean
in interface DataInput
IOException
public byte readByte() throws IOException
readByte
in interface DataInput
IOException
public int readUnsignedByte() throws IOException
readUnsignedByte
in interface DataInput
IOException
public short readShort() throws IOException
readShort
in interface DataInput
IOException
public int readUnsignedShort() throws IOException
readUnsignedShort
in interface DataInput
IOException
public char readChar() throws IOException
readChar
in interface DataInput
IOException
public int readInt() throws IOException
readInt
in interface DataInput
IOException
public long readLong() throws IOException
readLong
in interface DataInput
IOException
public float readFloat() throws IOException
readFloat
in interface DataInput
IOException
public double readDouble() throws IOException
readDouble
in interface DataInput
IOException
public String readLine() throws IOException
readLine
in interface DataInput
IOException
public String readUTF() throws IOException
readUTF
in interface DataInput
IOException
public void expandLimit(int required_limit) throws IOException
ByteArrayDataInput.EndOfBufferException
expandLimit
in class ByteArrayBuffer
IOException
- if an I/O error occurs (expansion impossible).Copyright © 2002–2025 Devexperts LLC. All rights reserved.