|
BeanIO 1.2.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.beanio.stream.xml.XmlWriterConfiguration
public class XmlWriterConfiguration
Stores XML writer configuration settings.
By default, indentation is disabled and no XML header will be written to an output stream.
XmlWriter
Constructor Summary | |
---|---|
XmlWriterConfiguration()
Constructs a new XmlWriterConfiguration. |
Method Summary | |
---|---|
void |
addNamespace(String prefix,
String uri)
Adds a namespace to be set on the root element. |
protected XmlWriterConfiguration |
clone()
|
String |
getEncoding()
Returns the XML character encoding to include in the document header. |
int |
getIndentation()
Returns the number of spaces to indent each level of XML, or -1 if indentation is disabled. |
String |
getLineSeparator()
Returns the text used to terminate a line when indentation is enabled. |
Map<String,String> |
getNamespaceMap()
Returns a map of namespace URI's to prefixes to be set on the root element. |
String |
getVersion()
Returns the XML version to include in the document header. |
boolean |
isIndentationEnabled()
Returns whether XML output will be indented. |
boolean |
isSuppressHeader()
Returns whether the XML header is suppressed. |
void |
setEncoding(String encoding)
Sets the XML character encoding to include in the document header. |
void |
setIndentation(int indentation)
Enables and sets the indentation level in spaces. |
void |
setLineSeparator(String lineSeparator)
Sets the text used to terminate a line when indentation is enabled. |
void |
setNamespaces(String list)
Sets the list of namespaces to be set on the root element. |
void |
setSuppressHeader(boolean suppressHeader)
Sets whether the XML header is suppressed. |
void |
setVersion(String version)
Sets the XML version to include in the document header. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XmlWriterConfiguration()
Method Detail |
---|
public int getIndentation()
public void setIndentation(int indentation)
indentation
- the number of spaces to indent each level of XML,
or -1 to disable indentationpublic boolean isIndentationEnabled()
public String getLineSeparator()
public void setLineSeparator(String lineSeparator)
lineSeparator
- the line separation textpublic boolean isSuppressHeader()
public void setSuppressHeader(boolean suppressHeader)
suppressHeader
- true to suppress the XML headerpublic String getVersion()
public void setVersion(String version)
version
- the XML versionpublic String getEncoding()
public void setEncoding(String encoding)
encoding
- the XML character encodingpublic void addNamespace(String prefix, String uri)
prefix
- the namespace prefixuri
- the namespace URIpublic void setNamespaces(String list)
setNamespaces("xsd http://www.w3.org/2001/XMLSchema b http://www.beanio.org/2011/01");
list
- the space delimited list of namespacespublic Map<String,String> getNamespaceMap()
protected XmlWriterConfiguration clone()
clone
in class Object
|
BeanIO 1.2.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |