com.fasterxml.aalto.out
Class WriterConfig

java.lang.Object
  extended by com.fasterxml.aalto.impl.CommonConfig
      extended by com.fasterxml.aalto.out.WriterConfig

public final class WriterConfig
extends CommonConfig

This is the shared configuration object passed by the factory to writer.


Field Summary
protected static String DEFAULT_AUTOMATIC_NS_PREFIX
           
 
Fields inherited from class com.fasterxml.aalto.impl.CommonConfig
_flagMods, _flags, IMPL_NAME, IMPL_VERSION
 
Constructor Summary
WriterConfig()
           
 
Method Summary
 byte[] allocFullBBuffer(int minSize)
           
 char[] allocFullCBuffer(int minSize)
           
 char[] allocMediumCBuffer(int minSize)
           
 char[] allocSmallCBuffer(int minSize)
           
 void configureForRobustness()
           
 void configureForSpeed()
          For Woodstox, setting this profile disables most checks for validity; specifically anything that can have measurable performance impact.
 void configureForXmlConformance()
           
 WriterConfig createNonShared()
           
 void doAutoCloseOutput(boolean state)
           
 void enableXml11()
           
 void freeFullBBuffer(byte[] buffer)
           
 void freeFullCBuffer(char[] buffer)
           
 void freeMediumCBuffer(char[] buffer)
           
 void freeSmallCBuffer(char[] buffer)
           
 String getActualEncoding()
           
 WNameTable getAsciiSymbols(WNameFactory f)
           
 String getAutomaticNsPrefix()
           
 WNameTable getCharSymbols(WNameFactory f)
           
 String getExternalEncoding()
          This method returns name of encoding that has been passed explicitly to the reader or writer, from outside.
 WNameTable getLatin1Symbols(WNameFactory f)
           
 String getPreferredEncoding()
           
 Object getProperty(String name, boolean isMandatory)
           
 WNameTable getUtf8Symbols(WNameFactory f)
           
 boolean isNamespaceAware()
           
 boolean isPropertySupported(String propName)
           
 boolean isXml11()
           
 void setActualEncodingIfNotSet(String enc)
           
 boolean setProperty(String name, Object value)
           
 boolean willAutoCloseOutput()
           
 boolean willCheckAttributes()
           
 boolean willCheckContent()
           
 boolean willCheckNames()
           
 boolean willCheckStructure()
           
 boolean willEscapeCR()
           
 boolean willFixContent()
           
 boolean willRepairNamespaces()
           
 
Methods inherited from class com.fasterxml.aalto.impl.CommonConfig
hasExplicitFlag, hasFlag, hasFlagBeenModified, setFlag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_AUTOMATIC_NS_PREFIX

protected static final String DEFAULT_AUTOMATIC_NS_PREFIX
See Also:
Constant Field Values
Constructor Detail

WriterConfig

public WriterConfig()
Method Detail

setActualEncodingIfNotSet

public void setActualEncodingIfNotSet(String enc)

doAutoCloseOutput

public void doAutoCloseOutput(boolean state)

enableXml11

public void enableXml11()

createNonShared

public WriterConfig createNonShared()

isXml11

public boolean isXml11()
Specified by:
isXml11 in class CommonConfig
Returns:
True, if the processing will be done according to Xml 1.1 rules; false if according to xml 1.0

getExternalEncoding

public String getExternalEncoding()
Description copied from class: CommonConfig
This 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:
getExternalEncoding in class CommonConfig
Returns:
Encoding that has been passed externally by the application

getActualEncoding

public String getActualEncoding()
Specified by:
getActualEncoding in class CommonConfig
Returns:
Actual encoding in use, as determined by the processor.

getPreferredEncoding

public String getPreferredEncoding()

getProperty

public Object getProperty(String name,
                          boolean isMandatory)
Overrides:
getProperty in class CommonConfig
isMandatory - If true, unrecognized property should result in IllegalArgumentException

setProperty

public boolean setProperty(String name,
                           Object value)
Overrides:
setProperty in class CommonConfig
Returns:
True, if the specified property was succesfully set to specified value; false if its value was not changed

isPropertySupported

public boolean isPropertySupported(String propName)
Overrides:
isPropertySupported in class CommonConfig

willRepairNamespaces

public boolean willRepairNamespaces()

isNamespaceAware

public boolean isNamespaceAware()

willAutoCloseOutput

public boolean willAutoCloseOutput()

getAutomaticNsPrefix

public String 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()

allocSmallCBuffer

public char[] allocSmallCBuffer(int minSize)

freeSmallCBuffer

public void freeSmallCBuffer(char[] buffer)

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

public WNameTable getUtf8Symbols(WNameFactory f)

getLatin1Symbols

public WNameTable getLatin1Symbols(WNameFactory f)

getAsciiSymbols

public WNameTable getAsciiSymbols(WNameFactory f)

getCharSymbols

public WNameTable getCharSymbols(WNameFactory f)


Copyright © 2012 Fasterxml.com. All Rights Reserved.