equip.runtime
Class MbufInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byequip.runtime.MbufInputStream

public class MbufInputStream
extends java.io.InputStream

Concrete Message buffer (Mbuf) input stream.


Field Summary
protected  Mbuf buf
           
protected  int pos
           
 
Constructor Summary
MbufInputStream()
          Default no-arg constructor (use reset(equip.runtime.Mbuf) to initialise for reading).
 
Method Summary
 int read()
          input stream API (return -1 for end of stream)
 int read2(byte[] cbuf, int minSize, int maxSize)
          internal implementation of read()
 void reset(Mbuf first)
          reset/set new linked list of message buffers to read from
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buf

protected Mbuf buf

pos

protected int pos
Constructor Detail

MbufInputStream

public MbufInputStream()
Default no-arg constructor (use reset(equip.runtime.Mbuf) to initialise for reading).

Method Detail

read

public int read()
         throws java.io.IOException
input stream API (return -1 for end of stream)

Throws:
java.io.IOException

reset

public void reset(Mbuf first)
reset/set new linked list of message buffers to read from


read2

public int read2(byte[] cbuf,
                 int minSize,
                 int maxSize)
internal implementation of read()