Package org.web3d.vrml.export
Class X3DBinarySerializer
java.lang.Object
org.web3d.vrml.export.X3DBinarySerializer
Serializes an X3D XML encoded document into an X3D binary document.
TODO: Stats collection for non builtins isn't written
TODO: proto and script fields are encoded as strings
- Version:
- $Revision: 1.11 $
- Author:
- Alan Hudson
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final String
static final int
static final int
static final int
static final int
protected CRProtoCreator
The creator used to instantiate protosprotected VRMLWorldRootNodeType
Root node used for proto creationprotected static final String
protected static final String
-
Constructor Summary
ConstructorsConstructorDescriptionX3DBinarySerializer
(int compMethod, boolean rd, float lossParam) Creates a new instance of X3DSerializer -
Method Summary
Modifier and TypeMethodDescriptionvoid
encodeField
(int fieldType, String name, String qName, String value, com.sun.xml.fastinfoset.sax.AttributesHolder aholder, VRMLFieldData field) void
setProtoMap
(Map<String, VRMLFieldDeclaration> protoMap) Set the map of node names to prototype decl.void
writeFiltered
(InputStream input, OutputStream output)
-
Field Details
-
METHOD_FASTEST_PARSING
public static final int METHOD_FASTEST_PARSING- See Also:
-
METHOD_SMALLEST_NONLOSSY
public static final int METHOD_SMALLEST_NONLOSSY- See Also:
-
METHOD_SMALLEST_LOSSY
public static final int METHOD_SMALLEST_LOSSY- See Also:
-
METHOD_STRINGS
public static final int METHOD_STRINGS- See Also:
-
VALIDATION_FEATURE_ID
- See Also:
-
SCHEMA_VALIDATION_FEATURE_ID
- See Also:
-
LOAD_DTD_ID
- See Also:
-
protoCreator
The creator used to instantiate protos -
root
Root node used for proto creation
-
-
Constructor Details
-
X3DBinarySerializer
public X3DBinarySerializer(int compMethod, boolean rd, float lossParam) Creates a new instance of X3DSerializer- Parameters:
compMethod
- What method to userd
- Should we remove defaultslossParam
- maximum loss for lossy compression
-
-
Method Details
-
setProtoMap
Set the map of node names to prototype decl. This will only have the top level protos. Nested proto's will not have field type information for encoding.- Parameters:
protoMap
- The top level proto map
-
writeFiltered
-
encodeField
public void encodeField(int fieldType, String name, String qName, String value, com.sun.xml.fastinfoset.sax.AttributesHolder aholder, VRMLFieldData field)
-