step.encoding
Class Strategy

java.lang.Object
  |
  +--step.encoding.Encoder
        |
        +--step.encoding.Strategy
Direct Known Subclasses:
OffsetIntStrategy, RegularValueStrategy

public abstract class Strategy
extends Encoder

An encoder that exploits patterns or characteristics of a data sequence.


Field Summary
protected  Encoder _baseEncoder
           
 
Constructor Summary
protected Strategy(Encoder baseEncoder, String strategyName)
          Create a strategy with the given base encoder and strategy name.
 
Method Summary
protected  StepObject baseDecode(DecodeContext context)
          Defer to the underlying base encoder to decode a value.
protected  void baseEncode(StepObject o, EncodeContext context)
          Defer to the underlying base encoder to encode a value.
protected  void eventMessage(String msg)
          Send a message to this encoder.
 
Methods inherited from class step.encoding.Encoder
decode, dump, encode, getFactory, getName, indent, makeFieldName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_baseEncoder

protected Encoder _baseEncoder
Constructor Detail

Strategy

protected Strategy(Encoder baseEncoder,
                   String strategyName)
Create a strategy with the given base encoder and strategy name.

Method Detail

baseEncode

protected void baseEncode(StepObject o,
                          EncodeContext context)
                   throws EncoderException,
                          IOException
Defer to the underlying base encoder to encode a value.

EncoderException
IOException

baseDecode

protected StepObject baseDecode(DecodeContext context)
                         throws EncoderException,
                                IOException
Defer to the underlying base encoder to decode a value.

EncoderException
IOException

eventMessage

protected void eventMessage(String msg)
Send a message to this encoder.

The default behavior is to forward the message to the base encoder.

Overrides:
eventMessage in class Encoder
See Also:
EncoderMessageEvent