|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
org.jboss.netty.buffer.ChannelBufferInputStream
public class ChannelBufferInputStream
An InputStream which reads data from a ChannelBuffer.
A read operation against this stream will occur at the readerIndex
of its underlying buffer and the readerIndex will increase during
the read operation.
This stream implements DataInput for your convenience.
The endianness of the stream is not always big endian but depends on
the endianness of the underlying buffer.
ChannelBufferOutputStream| Constructor Summary | |
|---|---|
ChannelBufferInputStream(ChannelBuffer buffer)
Creates a new stream which reads data from the specified buffer
starting at the current readerIndex and ending at the current
writerIndex. |
|
ChannelBufferInputStream(ChannelBuffer buffer,
int length)
Creates a new stream which reads data from the specified buffer
starting at the current readerIndex and ending at
readerIndex + length. |
|
| Method Summary | |
|---|---|
int |
available()
|
void |
mark(int readlimit)
|
boolean |
markSupported()
|
int |
read()
|
int |
read(byte[] b,
int off,
int len)
|
boolean |
readBoolean()
|
byte |
readByte()
|
int |
readBytes()
Returns the number of read bytes by this stream so far. |
char |
readChar()
|
double |
readDouble()
|
float |
readFloat()
|
void |
readFully(byte[] b)
|
void |
readFully(byte[] b,
int off,
int len)
|
int |
readInt()
|
String |
readLine()
|
long |
readLong()
|
short |
readShort()
|
int |
readUnsignedByte()
|
int |
readUnsignedShort()
|
String |
readUTF()
|
void |
reset()
|
long |
skip(long n)
|
int |
skipBytes(int n)
|
| Methods inherited from class java.io.InputStream |
|---|
close, read |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ChannelBufferInputStream(ChannelBuffer buffer)
buffer
starting at the current readerIndex and ending at the current
writerIndex.
public ChannelBufferInputStream(ChannelBuffer buffer,
int length)
buffer
starting at the current readerIndex and ending at
readerIndex + length.
IndexOutOfBoundsException - if readerIndex + length is greater than
writerIndex| Method Detail |
|---|
public int readBytes()
public int available()
throws IOException
available in class InputStreamIOExceptionpublic void mark(int readlimit)
mark in class InputStreampublic boolean markSupported()
markSupported in class InputStream
public int read()
throws IOException
read in class InputStreamIOException
public int read(byte[] b,
int off,
int len)
throws IOException
read in class InputStreamIOException
public void reset()
throws IOException
reset in class InputStreamIOException
public long skip(long n)
throws IOException
skip in class InputStreamIOException
public boolean readBoolean()
throws IOException
readBoolean in interface DataInputIOException
public byte readByte()
throws IOException
readByte in interface DataInputIOException
public char readChar()
throws IOException
readChar in interface DataInputIOException
public double readDouble()
throws IOException
readDouble in interface DataInputIOException
public float readFloat()
throws IOException
readFloat in interface DataInputIOException
public void readFully(byte[] b)
throws IOException
readFully in interface DataInputIOException
public void readFully(byte[] b,
int off,
int len)
throws IOException
readFully in interface DataInputIOException
public int readInt()
throws IOException
readInt in interface DataInputIOException
public String readLine()
throws IOException
readLine in interface DataInputIOException
public long readLong()
throws IOException
readLong in interface DataInputIOException
public short readShort()
throws IOException
readShort in interface DataInputIOException
public String readUTF()
throws IOException
readUTF in interface DataInputIOException
public int readUnsignedByte()
throws IOException
readUnsignedByte in interface DataInputIOException
public int readUnsignedShort()
throws IOException
readUnsignedShort in interface DataInputIOException
public int skipBytes(int n)
throws IOException
skipBytes in interface DataInputIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||