Interface Encoder
- All Known Subinterfaces:
- ArrayElementEncoder,- AttributeEncoder
- All Known Implementing Classes:
- ArrayEncoder,- BitSetDelegate.BitSetEncoder,- ByteArrayDelegate.ByteArrayEncoder,- ColorStateEncoder,- CursorDelegate.CursorEncoder,- DimensionDelegate.DimensionEncoder,- Ellipse2DDoubleDelegate.Ellipse2DDoubleEncoder,- Ellipse2DFloatDelegate.Ellipse2DFloatEncoder,- Encoders,- Encoders.BoolEncoder,- Encoders.ByteEncoder,- Encoders.ClassEncoder,- Encoders.ColorEncoder,- Encoders.DateEncoder,- Encoders.DoubleEncoder,- Encoders.FloatEncoder,- Encoders.IntEncoder,- Encoders.LongEncoder,- Encoders.QualityCodeEncoder,- Encoders.ShortEncoder,- Encoders.SignatureEncoder,- Encoders.StringEncoder,- Encoders.UUIDEncoder,- FontDelegate.FontEncoder,- GeneralPathDelegate.GeneralPathEncoder,- InsetsDelegate.InsetsEncoder,- LayoutConstraintsEncoder,- MethodDelegate.MethodEncoder,- Point2DDoubleDelegate.Point2DDoubleEncoder,- Point2DFloatDelegate.Point2DFloatEncoder,- PointDelegate.PointEncoder,- Rectangle2DDoubleDelegate.Rectangle2DDoubleEncoder,- Rectangle2DFloatDelegate.Rectangle2DFloatEncoder,- RectangleDelegate.RectangleEncoder,- RoundRectangle2DDoubleDelegate.RoundRectangle2DDoubleEncoder,- RoundRectangle2DFloatDelegate.RoundRectangle2DFloatEncoder
public interface Encoder
An encoder contains a value of some type that it knows how to encode as both XML text or as binary.
- 
Method SummaryModifier and TypeMethodDescriptionintReport the number of bytes that a call toobjectToBinary(DataOutput, XMLSerializationContext, StringEncodingTable)will put on the output streamvoidobjectToBinary(DataOutput out, XMLSerializationContext context, StringEncodingTable stringTable) Encode the object as binary data by writing it to the provided DataOutput.voidobjectToString(Writer out, XMLSerializationContext context) Encode the object as character data by writing it to the provided Writer.
- 
Method Details- 
objectToStringEncode the object as character data by writing it to the provided Writer.- Throws:
- IOException
 
- 
objectToBinaryvoid objectToBinary(DataOutput out, XMLSerializationContext context, StringEncodingTable stringTable) throws IOException Encode the object as binary data by writing it to the provided DataOutput. It is preferrable not to write String data to the DataOutput, but instead use the string table to get an ID for the string, and write the ID instead. All strings that are given IDs will be written in a shared string pool.- Throws:
- IOException
 
- 
getBinaryLengthint getBinaryLength()Report the number of bytes that a call toobjectToBinary(DataOutput, XMLSerializationContext, StringEncodingTable)will put on the output stream
 
-