|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jppf.io.StreamInputSource
public class StreamInputSource
Input source that takes an input stream as its source.
| Constructor Summary | |
|---|---|
StreamInputSource(InputStream is)
Initialize this stream input source with the specified input stream. |
|
| Method Summary | |
|---|---|
void |
close()
Close this input source and release any system resources associated with it. |
int |
read(byte[] data,
int offset,
int len)
Read data from this input source into an array of bytes. |
int |
read(ByteBuffer buffer)
Read data from this input source into a byte buffer. |
int |
readInt()
Read an int value from this input source. |
int |
skip(int n)
Skip n bytes of data form this input source. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StreamInputSource(InputStream is)
is - the input stream to read from.| Method Detail |
|---|
public int read(byte[] data,
int offset,
int len)
throws Exception
read in interface InputSourcedata - the buffer into which to write.offset - the position in the buffer where to start storing the data.len - the size in bytes of the data to read.
Exception - if an IO error occurs.InputSource.read(byte[], int, int)
public int read(ByteBuffer buffer)
throws Exception
read in interface InputSourcebuffer - the buffer into which to write.
Exception - if an IO error occurs.InputSource.read(java.nio.ByteBuffer)
public int readInt()
throws Exception
readInt in interface InputSourceException - if an IO error occurs.InputSource.readInt()
public int skip(int n)
throws Exception
n bytes of data form this input source.
skip in interface InputSourcen - the number of bytes to skip.
Exception - if an IO error occurs.InputSource.skip(int)
public void close()
throws IOException
close in interface CloseableIOException - if an IO error occurs.Closeable.close()
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||