|
JBoss Marshalling 1.3.0.CR9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
org.jboss.marshalling.SimpleByteInput
org.jboss.marshalling.ByteInputStream
public class ByteInputStream

An InputStream which implements ByteInput and reads bytes from another ByteInput.
Usually the Marshalling.createByteInput(InputStream) method should be used to create instances because
it can detect when the target already implements ByteInput.
| Field Summary | |
|---|---|
protected ByteInput |
byteInput
|
| Constructor Summary | |
|---|---|
ByteInputStream(ByteInput byteInput)
Create a new instance. |
|
| Method Summary | |
|---|---|
int |
available()
Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking by the next invocation of a method for this input stream. |
void |
close()
|
int |
read()
Reads the next byte of data from the input stream. |
int |
read(byte[] b)
Read some bytes from the input stream into the given array. |
int |
read(byte[] b,
int off,
int len)
Read some bytes from the input stream into the given array. |
long |
skip(long n)
Skips over and discards up to n bytes of data from this input stream. |
| Methods inherited from class java.io.InputStream |
|---|
mark, markSupported, reset |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected volatile ByteInput byteInput
| Constructor Detail |
|---|
public ByteInputStream(ByteInput byteInput)
byteInput - the byte input to read from| Method Detail |
|---|
public int read()
throws IOException
read in interface ByteInputread in class InputStreamIOException - if an error occurs
public int read(byte[] b)
throws IOException
read in interface ByteInputread in class InputStreamb - the destination array
IOException - if an error occurs
public int read(byte[] b,
int off,
int len)
throws IOException
read in interface ByteInputread in class InputStreamb - the destination arrayoff - the offset into the array into which data should be readlen - the number of bytes to attempt to fill in the destination array
IOException - if an error occurs
public long skip(long n)
throws IOException
n bytes of data from this input stream. If the end of stream is reached,
this method returns 0 in order to be consistent with InputStream.skip(long).
skip in interface ByteInputskip in class InputStreamn - the number of bytes to attempt to skip
IOException - if an error occurs
public int available()
throws IOException
available in interface ByteInputavailable in class InputStreamIOException - if an error occurs
public void close()
throws IOException
close in interface Closeableclose in class InputStreamIOException
|
JBoss Marshalling 1.3.0.CR9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||