|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
com.sun.grizzly.filter.RemoteInputStream
public class RemoteInputStream
Stream that blocks on empty read() until close()
is called. This is usefull in scenarios where a server streams FragmentMessage to a client.
Enables therefore Client to start processing bytes as soon as first FragmentMessage arrives.
When finished a Server or Producer of bytes must call close() so that client
is released from waiting on this stream.
| Constructor Summary | |
|---|---|
RemoteInputStream()
|
|
| Method Summary | |
|---|---|
void |
add(java.nio.ByteBuffer buffer)
Adds a ByteBuffer to the stream |
void |
add(java.util.List<java.nio.ByteBuffer> bList)
Adds a List of ByteBuffers to the Stream |
int |
available()
|
void |
close()
Adds EOF to end of Stream. |
long |
getTimeStamp()
|
boolean |
isApplicationLayerException()
|
int |
read()
If no bytes are available blocks until close() is called. |
int |
read(byte[] bytes,
int off,
int len)
If no bytes are available blocks until close() is called |
void |
setApplicationLayerException(boolean applicationLayerException)
|
void |
setIOException(java.io.IOException exception)
|
long |
skip(long n)
|
| Methods inherited from class java.io.InputStream |
|---|
mark, markSupported, read, reset |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RemoteInputStream()
| Method Detail |
|---|
public boolean isApplicationLayerException()
public void setApplicationLayerException(boolean applicationLayerException)
public void setIOException(java.io.IOException exception)
public long getTimeStamp()
public void add(java.nio.ByteBuffer buffer)
buffer - bytes to add to inputstreampublic void add(java.util.List<java.nio.ByteBuffer> bList)
bList - List of ByteBuffer containing stream bytespublic void close()
close in interface java.io.Closeableclose in class java.io.InputStream
public int read()
throws java.io.IOException
close() is called.
read in class java.io.InputStreamjava.io.IOException
public int read(byte[] bytes,
int off,
int len)
throws java.io.IOException
close() is called
read in class java.io.InputStreambytes - byte array to be filledoff - offsetlen - size
java.io.IOException
public long skip(long n)
throws java.io.IOException
skip in class java.io.InputStreamjava.io.IOException
public int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||