step.encoding
Class ArrayEncoder
java.lang.Object
|
+--step.encoding.Encoder
|
+--step.encoding.ArrayEncoder
- public class ArrayEncoder
- extends Encoder
An encoder for STEP array objects.
- See Also:
StepArray
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ArrayEncoder
public ArrayEncoder(String name,
FieldDef lengthDef,
FieldDef elementDef,
EncoderFactory factory)
- Create a new encoder for STEP array objects.
- Parameters:
name - the name of the encoder.lengthDef - a definition for the length fieldelementDef - a definition for the element fieldfactory - the EncoderFactory used to create the encoder
- Throws:
IllegalArgumentException - if the length definition does not handle
StepInt values.
encode
public void encode(StepObject o,
EncodeContext context)
throws EncoderException,
IOException
- Encode a STEP array object.
- Specified by:
encode in class Encoder
- Throws:
EncoderException - if the object is not a StepArray.
IOException - if the encode operation encountered an I/O failure.
decode
public StepObject decode(DecodeContext context)
throws EncoderException,
IOException
- Decode a STEP array 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