net.sf.xbus.technical
Interface RecordByteArrayReader


public interface RecordByteArrayReader

RecordByteArrayReader are used by some Senders and Receivers to send a byte stream through the xBus.


Method Summary
 void prepareReading()
          Initialization to be done before reading from the RecordByteArrayReader.
 byte[] readRecord()
          readRecord is called by senders to read the incoming data line by line.
 void terminateReading()
          Cleanup to be done after reading from the RecordByteArrayReader, e.g. closing an InputStream.
 

Method Detail

prepareReading

void prepareReading()
                    throws XException
Initialization to be done before reading from the RecordByteArrayReader.

Throws:
XException - if something goes wrong

readRecord

byte[] readRecord()
                  throws XException
readRecord is called by senders to read the incoming data line by line.

Returns:
null if there is no more record
Throws:
XException - if something goes wrong

terminateReading

void terminateReading()
                      throws XException
Cleanup to be done after reading from the RecordByteArrayReader, e.g. closing an InputStream.

Throws:
XException - if something goes wrong