Package com.oss.asn1
Class XERCoder
java.lang.Object
com.oss.asn1.Coder
com.oss.asn1.XERCoder
- All Implemented Interfaces:
XMLCoder
This class implements coding services for XML Encoding Rules (XER).
- Since:
- ASN.1/Java 2.0-beta A
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add whitespace as necessary to improve readability of XML document.void
Disable user defined XER encodings which are generated by user classes which implement XERCoderInterface.void
Do not generate whitespace into the XML document.void
Enable user defined XER encodings which are generated by user classes which implement XERCoderInterface.void
Initial XML declaration is excluded from the XML document.int
Get the number of spaces allocated for indentingvoid
Make the XML document contain the initial XML declaration.void
setIndentWidth
(int width) Set indentation width for generating whitespaceMethods inherited from class com.oss.asn1.Coder
decode, decode, decodeWithPositions, disableAutomaticDecoding, disableAutomaticEncoding, disableContainedValueDecoding, disableContainedValueEncoding, disableDecoderConstraints, disableDecoderDebugging, disableDeferredDecoding, disableEncoderConstraints, disableEncoderDebugging, disableEncodingOfAbsentComponents, disableEncodinOfImpliedValues, disableJSONCoderInterface, disableRelaxedDecoding, disableRichDecoderExceptions, disableStrictDecoding, disableTruncatedZeroSecondsInGeneralizedTime, disableTruncatedZeroSecondsInUTCTime, enableAutomaticDecoding, enableAutomaticEncoding, enableContainedValueDecoding, enableContainedValueDecoding, enableContainedValueEncoding, enableDecoderConstraints, enableDecoderDebugging, enableDeferredDecoding, enableEncoderConstraints, enableEncoderDebugging, enableEncodingOfAbsentComponents, enableEncodingOfImpliedValues, enableJSONCoderInterface, enableRelaxedDecoding, enableRichDecoderExceptions, enableStrictDecoding, enableTruncatedZeroSecondsInGeneralizedTime, enableTruncatedZeroSecondsInUTCTime, encode, encode, encode, getDecoderDebugOut, getDecoderDebugProperties, getEncoderDebugOut, getEncoderDebugProperties, getNumberOfPaddingBits, getStorageManager, isPDUDetectionAvailable, setDecoderDebugOut, setDecoderDebugProperties, setEncoderDebugOut, setEncoderDebugProperties, setStorageManager, toString, useDefiniteLengthEncoding, useIndefiniteLengthEncoding, usingDefiniteLengthEncoding, validate
-
Field Details
-
ID
The ID string identifies XER encoding rules. The string should be used as relayID when storing unknown extension additions encoded with XER.- See Also:
-
-
Method Details
-
enableXERCoderInterface
public void enableXERCoderInterface()Enable user defined XER encodings which are generated by user classes which implement XERCoderInterface.- Overrides:
enableXERCoderInterface
in classCoder
-
disableXERCoderInterface
public void disableXERCoderInterface()Disable user defined XER encodings which are generated by user classes which implement XERCoderInterface.- Overrides:
disableXERCoderInterface
in classCoder
-
enableCompact
public void enableCompact()Do not generate whitespace into the XML document. In the compact mode the encoding is written without any whitespace as a single line of text. If the compact mode is disabled newlines are inserted as necessary and the indentation is applied.- Overrides:
enableCompact
in classCoder
-
disableCompact
public void disableCompact()Add whitespace as necessary to improve readability of XML document. In the compact mode the encoding is written without any whitespace as a single line of text. If the compact mode is disabled newlines are inserted as necessary and the indentation is applied.- Overrides:
disableCompact
in classCoder
-
includeXMLDeclaration
public void includeXMLDeclaration()Make the XML document contain the initial XML declaration.- Overrides:
includeXMLDeclaration
in classCoder
-
excludeXMLDeclaration
public void excludeXMLDeclaration()Initial XML declaration is excluded from the XML document.- Overrides:
excludeXMLDeclaration
in classCoder
-
setIndentWidth
public void setIndentWidth(int width) Set indentation width for generating whitespace- Overrides:
setIndentWidth
in classCoder
- Parameters:
width
- number of spaces for indenting
-
getIndentWidth
public int getIndentWidth()Get the number of spaces allocated for indenting- Overrides:
getIndentWidth
in classCoder
- Returns:
- indentation width setting
-