Class WriterConfig
java.lang.Object
com.fasterxml.aalto.impl.CommonConfig
com.fasterxml.aalto.out.WriterConfig
public final class WriterConfig
extends com.fasterxml.aalto.impl.CommonConfig
This is the shared configuration object passed by the factory to writer.
-
Field Summary
FieldsFields inherited from class com.fasterxml.aalto.impl.CommonConfig
_flagMods, _flags, IMPL_NAME, IMPL_VERSION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]allocFullBBuffer(int minSize) char[]allocFullCBuffer(int minSize) char[]allocMediumCBuffer(int minSize) voidvoidFor Woodstox, setting this profile disables most checks for validity; specifically anything that can have measurable performance impact.voidvoiddoAutoCloseOutput(boolean state) voidvoidfreeFullBBuffer(byte[] buffer) voidfreeFullCBuffer(char[] buffer) voidfreeMediumCBuffer(char[] buffer) This method returns name of encoding that has been passed explicitly to the reader or writer, from outside.getProperty(String name, boolean isMandatory) booleanbooleanisPropertySupported(String propName) booleanisXml11()voidbooleansetProperty(String name, Object value) booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanMethods inherited from class com.fasterxml.aalto.impl.CommonConfig
hasExplicitFlag, hasFlag, hasFlagBeenModified, setFlag
-
Field Details
-
DEFAULT_AUTOMATIC_NS_PREFIX
- See Also:
-
-
Constructor Details
-
WriterConfig
public WriterConfig()
-
-
Method Details
-
setActualEncodingIfNotSet
-
doAutoCloseOutput
public void doAutoCloseOutput(boolean state) -
enableXml11
public void enableXml11() -
isXml11
public boolean isXml11()- Specified by:
isXml11in classcom.fasterxml.aalto.impl.CommonConfig- Returns:
- True, if the processing will be done according to Xml 1.1 rules; false if according to xml 1.0
-
getExternalEncoding
Description copied from class:com.fasterxml.aalto.impl.CommonConfigThis method returns name of encoding that has been passed explicitly to the reader or writer, from outside. An example is that HTTP server may pass encoding as declared in HTTP headers. This should either be null (if none passed), or the same as actual encoding (which is determined from physical stream contents [for readers], or from encoder properties / configuration [for writers]- Specified by:
getExternalEncodingin classcom.fasterxml.aalto.impl.CommonConfig- Returns:
- Encoding that has been passed externally by the application
-
getActualEncoding
- Specified by:
getActualEncodingin classcom.fasterxml.aalto.impl.CommonConfig- Returns:
- Actual encoding in use, as determined by the processor.
-
getPreferredEncoding
-
getProperty
- Overrides:
getPropertyin classcom.fasterxml.aalto.impl.CommonConfig- Parameters:
isMandatory- If true, unrecognized property should result inIllegalArgumentException
-
setProperty
-
isPropertySupported
- Overrides:
isPropertySupportedin classcom.fasterxml.aalto.impl.CommonConfig
-
willRepairNamespaces
public boolean willRepairNamespaces() -
isNamespaceAware
public boolean isNamespaceAware() -
willAutoCloseOutput
public boolean willAutoCloseOutput() -
getAutomaticNsPrefix
- Returns:
- Prefix to use as the base for automatically generated namespace prefixes ("namespace prefix prefix", so to speak). Defaults to "axns".
-
configureForXmlConformance
public void configureForXmlConformance() -
configureForRobustness
public void configureForRobustness() -
configureForSpeed
public void configureForSpeed()For Woodstox, setting this profile disables most checks for validity; specifically anything that can have measurable performance impact. -
willCheckStructure
public boolean willCheckStructure() -
willCheckContent
public boolean willCheckContent() -
willCheckNames
public boolean willCheckNames() -
willCheckAttributes
public boolean willCheckAttributes() -
willFixContent
public boolean willFixContent() -
willEscapeCR
public boolean willEscapeCR() -
allocMediumCBuffer
public char[] allocMediumCBuffer(int minSize) -
freeMediumCBuffer
public void freeMediumCBuffer(char[] buffer) -
allocFullCBuffer
public char[] allocFullCBuffer(int minSize) -
freeFullCBuffer
public void freeFullCBuffer(char[] buffer) -
allocFullBBuffer
public byte[] allocFullBBuffer(int minSize) -
freeFullBBuffer
public void freeFullBBuffer(byte[] buffer) -
getUtf8Symbols
-
getLatin1Symbols
-
getAsciiSymbols
-
getCharSymbols
-