step.encoding
Class DataEncoder
java.lang.Object
|
+--step.encoding.Encoder
|
+--step.encoding.DataEncoder
- public class DataEncoder
- extends Encoder
An encoder for STEP data
objects.
- See Also:
StepData
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataEncoder
public DataEncoder(String name,
FieldDef lengthDef,
EncoderFactory factory)
- Create a new encoder for STEP
data
objects.
- Parameters:
name
- the name for this encoder.lengthDef
- a definition for the length field of data objects.factory
- the EncoderFactory
used to create this encoder
- Throws:
IllegalArgumentException
- if the length field does not handle
StepInt
values.
encode
public void encode(StepObject o,
EncodeContext context)
throws EncoderException,
IOException
- Encode a STEP
data
object.
- Specified by:
encode
in class Encoder
- Throws:
EncoderException
- if the object was not a StepData
.
IOException
- if the encode operation encountered an I/O failure.
decode
public StepObject decode(DecodeContext context)
throws EncoderException,
IOException
- Decode a STEP
data
object.
- Specified by:
decode
in class Encoder
- Throws:
IOException
- if the decode operation encountered an I/O failure.
EncoderException
- if the decode operation encountered an error.
dump
public void dump(int level)
- Specified by:
dump
in class Encoder