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 EncoderAn encoder contains a value of some type that it knows how to encode as both XML text or as binary.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetBinaryLength()Report the number of bytes that a call toobjectToBinary(DataOutput, XMLSerializationContext, StringEncodingTable)will put on the output streamvoidobjectToBinary(java.io.DataOutput out, XMLSerializationContext context, StringEncodingTable stringTable)Encode the object as binary data by writing it to the provided DataOutput.voidobjectToString(java.io.Writer out, XMLSerializationContext context)Encode the object as character data by writing it to the provided Writer.
-
-
-
Method Detail
-
objectToString
void objectToString(java.io.Writer out, XMLSerializationContext context) throws java.io.IOExceptionEncode the object as character data by writing it to the provided Writer.- Throws:
java.io.IOException
-
objectToBinary
void objectToBinary(java.io.DataOutput out, XMLSerializationContext context, StringEncodingTable stringTable) throws java.io.IOExceptionEncode 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:
java.io.IOException
-
getBinaryLength
int getBinaryLength()
Report the number of bytes that a call toobjectToBinary(DataOutput, XMLSerializationContext, StringEncodingTable)will put on the output stream
-
-