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, setPositionprotected 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 DataInputIOExceptionpublic void readFully(byte[] b,
int off,
int len)
throws IOException
readFully in interface DataInputIOExceptionpublic int skipBytes(int n)
throws IOException
skipBytes in interface DataInputIOExceptionpublic boolean readBoolean()
throws IOException
readBoolean in interface DataInputIOExceptionpublic byte readByte()
throws IOException
readByte in interface DataInputIOExceptionpublic int readUnsignedByte()
throws IOException
readUnsignedByte in interface DataInputIOExceptionpublic short readShort()
throws IOException
readShort in interface DataInputIOExceptionpublic int readUnsignedShort()
throws IOException
readUnsignedShort in interface DataInputIOExceptionpublic char readChar()
throws IOException
readChar in interface DataInputIOExceptionpublic int readInt()
throws IOException
readInt in interface DataInputIOExceptionpublic long readLong()
throws IOException
readLong in interface DataInputIOExceptionpublic float readFloat()
throws IOException
readFloat in interface DataInputIOExceptionpublic double readDouble()
throws IOException
readDouble in interface DataInputIOExceptionpublic String readLine() throws IOException
readLine in interface DataInputIOExceptionpublic String readUTF() throws IOException
readUTF in interface DataInputIOExceptionpublic void expandLimit(int required_limit)
throws IOException
ByteArrayDataInput.EndOfBufferExceptionexpandLimit in class ByteArrayBufferIOException - if an I/O error occurs (expansion impossible).Copyright © 2002–2025 Devexperts LLC. All rights reserved.