|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
java.io.ByteArrayInputStream
com.hazelcast.nio.FastByteArrayInputStream
public class FastByteArrayInputStream
Field Summary |
---|
Fields inherited from class java.io.ByteArrayInputStream |
---|
buf, count, mark, pos |
Constructor Summary | |
---|---|
FastByteArrayInputStream(byte[] buf)
|
|
FastByteArrayInputStream(byte[] buf,
int offset,
int length)
|
Method Summary | |
---|---|
int |
available()
|
boolean |
markSupported()
|
int |
read()
|
int |
read(byte[] b,
int off,
int len)
|
boolean |
readBoolean()
|
byte |
readByte()
See the general contract of the readByte method of
DataInput . |
char |
readChar()
See the general contract of the readChar method of
DataInput . |
double |
readDouble()
See the general contract of the readDouble method of
DataInput . |
float |
readFloat()
See the general contract of the readFloat method of
DataInput . |
void |
readFully(byte[] b)
|
void |
readFully(byte[] b,
int off,
int len)
|
int |
readInt()
See the general contract of the readInt method of
DataInput . |
java.lang.String |
readLine()
Deprecated. This method does not properly convert bytes to characters. As of JDK 1.1, the preferred way to read lines of text is via the BufferedReader.readLine() method.
Programs that use the DataInputStream class to
read lines can be converted to use the
BufferedReader class by replacing code of the
form: with:DataInputStream d = new DataInputStream(in); BufferedReader d = new BufferedReader(new InputStreamReader(in)); |
long |
readLong()
See the general contract of the readLong method of
DataInput . |
short |
readShort()
See the general contract of the readShort method of
DataInput . |
int |
readUnsignedByte()
See the general contract of the readUnsignedByte method of
DataInput . |
int |
readUnsignedShort()
See the general contract of the readUnsignedShort method of
DataInput . |
java.lang.String |
readUTF()
See the general contract of the readUTF method of
DataInput . |
void |
reset()
|
void |
set(byte[] bytes,
int size)
|
long |
skip(long n)
|
int |
skipBytes(int n)
|
Methods inherited from class java.io.ByteArrayInputStream |
---|
close, mark |
Methods inherited from class java.io.InputStream |
---|
read |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FastByteArrayInputStream(byte[] buf)
public FastByteArrayInputStream(byte[] buf, int offset, int length)
Method Detail |
---|
public int read()
read
in class java.io.ByteArrayInputStream
public int read(byte[] b, int off, int len)
read
in class java.io.ByteArrayInputStream
public long skip(long n)
skip
in class java.io.ByteArrayInputStream
public final int skipBytes(int n) throws java.io.IOException
skipBytes
in interface java.io.DataInput
java.io.IOException
public int available()
available
in class java.io.ByteArrayInputStream
public boolean markSupported()
markSupported
in class java.io.ByteArrayInputStream
public void reset()
reset
in class java.io.ByteArrayInputStream
public void set(byte[] bytes, int size)
public final boolean readBoolean() throws java.io.IOException
readBoolean
in interface java.io.DataInput
java.io.IOException
public final byte readByte() throws java.io.IOException
readByte
method of
DataInput
.
Bytes for this operation are read from the contained input stream.
readByte
in interface java.io.DataInput
byte
.
java.io.EOFException
- if this input stream has reached the end.
java.io.IOException
- if an I/O error occurs.FilterInputStream.in
public final char readChar() throws java.io.IOException
readChar
method of
DataInput
.
Bytes for this operation are read from the contained input stream.
readChar
in interface java.io.DataInput
java.io.EOFException
- if this input stream reaches the end before reading two
bytes.
java.io.IOException
- if an I/O error occurs.FilterInputStream.in
public final double readDouble() throws java.io.IOException
readDouble
method of
DataInput
.
Bytes for this operation are read from the contained input stream.
readDouble
in interface java.io.DataInput
double
.
java.io.EOFException
- if this input stream reaches the end before reading eight
bytes.
java.io.IOException
- if an I/O error occurs.DataInputStream.readLong()
,
Double.longBitsToDouble(long)
public final float readFloat() throws java.io.IOException
readFloat
method of
DataInput
.
Bytes for this operation are read from the contained input stream.
readFloat
in interface java.io.DataInput
float
.
java.io.EOFException
- if this input stream reaches the end before reading four
bytes.
java.io.IOException
- if an I/O error occurs.DataInputStream.readInt()
,
Float.intBitsToFloat(int)
public final void readFully(byte[] b) throws java.io.IOException
readFully
in interface java.io.DataInput
java.io.IOException
public final void readFully(byte[] b, int off, int len) throws java.io.IOException
readFully
in interface java.io.DataInput
java.io.IOException
public final int readInt() throws java.io.IOException
readInt
method of
DataInput
.
Bytes for this operation are read from the contained input stream.
readInt
in interface java.io.DataInput
int
.
java.io.EOFException
- if this input stream reaches the end before reading four
bytes.
java.io.IOException
- if an I/O error occurs.FilterInputStream.in
@Deprecated public final java.lang.String readLine() throws java.io.IOException
BufferedReader.readLine()
method.
Programs that use the DataInputStream
class to
read lines can be converted to use the
BufferedReader
class by replacing code of the
form: with:DataInputStream d = new DataInputStream(in);
BufferedReader d = new BufferedReader(new InputStreamReader(in));
readLine
method of
DataInput
.
Bytes for this operation are read from the contained input stream.
readLine
in interface java.io.DataInput
java.io.IOException
- if an I/O error occurs.BufferedReader.readLine()
,
FilterInputStream.in
public final long readLong() throws java.io.IOException
readLong
method of
DataInput
.
Bytes for this operation are read from the contained input stream.
readLong
in interface java.io.DataInput
long
.
java.io.EOFException
- if this input stream reaches the end before reading eight
bytes.
java.io.IOException
- if an I/O error occurs.FilterInputStream.in
public final short readShort() throws java.io.IOException
readShort
method of
DataInput
.
Bytes for this operation are read from the contained input stream.
readShort
in interface java.io.DataInput
java.io.EOFException
- if this input stream reaches the end before reading two
bytes.
java.io.IOException
- if an I/O error occurs.FilterInputStream.in
public final int readUnsignedByte() throws java.io.IOException
readUnsignedByte
method of
DataInput
.
Bytes for this operation are read from the contained input stream.
readUnsignedByte
in interface java.io.DataInput
java.io.EOFException
- if this input stream has reached the end.
java.io.IOException
- if an I/O error occurs.FilterInputStream.in
public final int readUnsignedShort() throws java.io.IOException
readUnsignedShort
method of
DataInput
.
Bytes for this operation are read from the contained input stream.
readUnsignedShort
in interface java.io.DataInput
java.io.EOFException
- if this input stream reaches the end before reading two
bytes.
java.io.IOException
- if an I/O error occurs.FilterInputStream.in
public final java.lang.String readUTF() throws java.io.IOException
readUTF
method of
DataInput
.
Bytes for this operation are read from the contained input stream.
readUTF
in interface java.io.DataInput
java.io.EOFException
- if this input stream reaches the end before reading all
the bytes.
java.io.IOException
- if an I/O error occurs.
java.io.UTFDataFormatException
- if the bytes do not represent a valid modified UTF-8
encoding of a string.DataInputStream.readUTF(java.io.DataInput)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |