|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
org.opcfoundation.ua.utils.bytebuffer.IncubationBuffer
public class IncubationBuffer
Input stream with a sequence of ByteBuffers as backend. The data in ByteBuffers in read in the order they are "incubated" The data becomes available when the ByteBuffers are "hatched" Input stream blocks until data becomes available.
| Field Summary | |
|---|---|
protected static ByteBuffer |
CLOSED_MARKER
Constant CLOSED_MARKER |
protected ByteBuffer |
cur
|
protected IncubationQueue<ByteBuffer> |
queue
|
| Constructor Summary | |
|---|---|
IncubationBuffer()
Constructor for IncubationBuffer. |
|
| Method Summary | |
|---|---|
int |
available()
|
void |
close()
close. |
void |
forceClose()
forceClose. |
void |
hatch(ByteBuffer buf)
Makes the byte buffer available to input stream reader |
void |
incubate(ByteBuffer buf)
Submits a byte buffer to the use of input stream |
int |
read()
|
int |
read(byte[] b,
int off,
int len)
|
| Methods inherited from class java.io.InputStream |
|---|
mark, markSupported, read, reset, skip |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final ByteBuffer CLOSED_MARKER
CLOSED_MARKER
protected IncubationQueue<ByteBuffer> queue
protected ByteBuffer cur
| Constructor Detail |
|---|
public IncubationBuffer()
Constructor for IncubationBuffer.
| Method Detail |
|---|
public void incubate(ByteBuffer buf)
buf - byte buffer to offer for usepublic void hatch(ByteBuffer buf)
buf - a ByteBuffer object.public void close()
close.
close in interface Closeableclose in class InputStreampublic void forceClose()
forceClose.
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 int available()
throws IOException
available in class InputStreamIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||