step.io
Class StepEncodedOutput.RecordContext

java.lang.Object
  |
  +--step.io.StepEncodedOutput.RecordContext
All Implemented Interfaces:
EncodeContext
Enclosing class:
StepEncodedOutput

public class StepEncodedOutput.RecordContext
extends Object
implements EncodeContext


Method Summary
 byte[] close()
           
 void encode(StepRecord record)
           
 void metaWrite(MetaEvent event)
          Write meta-data at the current position in the output context.
 void write(Object o)
          Write a normal data object to the output context.
 int writeLevel()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

encode

public void encode(StepRecord record)
            throws IOException
IOException

write

public void write(Object o)
           throws IOException
Description copied from interface: EncodeContext
Write a normal data object to the output context. The object is usually a byte[], however it may be any object agreed upon by the implementation and some Encoder.

Specified by:
write in interface EncodeContext
Parameters:
o - the object to write, generally a byte[].
Throws:
ClassCastException - if the object is not a byte[].
IOException - if an I/O error occurred writing the object.

metaWrite

public void metaWrite(MetaEvent event)
               throws IOException
Description copied from interface: EncodeContext
Write meta-data at the current position in the output context.

Specified by:
metaWrite in interface EncodeContext
Throws:
ClassCastException - if the event is not a StepRecord.
IOException - if an I/O error occurred writing the event.

close

public byte[] close()
             throws IOException
Throws:
IOException - if an I/O error occurred writing a MetaRecord.

writeLevel

public int writeLevel()