|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jibx.ws.io.MessageOptions
public final class MessageOptions
Defines options for the encoding, XML declaration and formatting of the XML message, and the media types for the message.
Constructor Summary | |
---|---|
MessageOptions()
Default constructor for UTF-8, with no formatting and XML declaration containing XML version only. |
|
MessageOptions(char indentChar,
int indentCount,
String newLine)
Construct with message formatting details. |
|
MessageOptions(MessageOptions options)
Copy constructor. |
|
MessageOptions(XmlEncoding encoding)
Construct with specified encoding, no formatting and XML declaration containing XML version only. |
|
MessageOptions(XmlEncoding encoding,
boolean includeEncodingDecl,
Boolean standaloneDecl)
Construct with specified encoding and XML declaration, with no formatting. |
|
MessageOptions(XmlEncoding encoding,
boolean includeEncodingDecl,
Boolean standaloneDecl,
char indentChar,
int indentCount,
String newLine)
Construct with specified message encoding, formatting and XML declaration. |
|
MessageOptions(XmlEncoding encoding,
char indentChar,
int indentCount,
String newLine)
Construct with specified message encoding and formatting, with default XML declaration containing XML version only. |
Method Summary | |
---|---|
XmlEncoding |
getEncoding()
Gets the encoding to use for the message. |
String |
getEncodingDeclString()
Returns the value of the encoding attribute for the XML declaration. |
char |
getIndentChar()
Get the character to use for indenting the XML. |
int |
getIndentCount()
Get the number of indent characters to indent the XML by. |
String[] |
getInMediaTypeCodes()
Get the media type short code(s) to be accepted for input. |
String |
getNewLine()
Get the string to use for new lines. |
String |
getOutMediaTypeCode()
Get the media type short code to be used for output. |
Boolean |
getStandaloneDecl()
Get the setting for the standalone attribute of the XML declaration. |
String |
getStandaloneDeclString()
Returns the value of the standalone attribute for the XML declaration. |
XmlOptions |
getXmlOptions()
Returns the Xml options for the message. |
boolean |
isIncludeEncodingDecl()
Get the setting for whether to include the encoding attribute in the XML declaration. |
void |
setEncoding(XmlEncoding encoding)
Sets the encoding to use for the message. |
void |
setIncludeEncodingDecl(boolean includeEncodingDecl)
Set whether to include the encoding attribute in the XML declaration. |
void |
setIndentChar(char indentChar)
Set the character to use for indenting the XML. |
void |
setIndentCount(int indentCount)
Set the number of indent characters to indent the XML by. |
void |
setInMediaTypeCodes(String[] codes)
Set the media type short code(s) to be accepted for input. |
void |
setNewLine(String newLine)
Set the string to use for new lines. |
void |
setOutMediaTypeCode(String code)
Set the media type short code to be used for output. |
void |
setStandaloneDecl(Boolean standaloneDecl)
Set the standalone attribute of the XML declaration. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MessageOptions()
public MessageOptions(MessageOptions options)
options
- the options to copypublic MessageOptions(XmlEncoding encoding)
encoding
- the encoding to apply to the messagepublic MessageOptions(XmlEncoding encoding, boolean includeEncodingDecl, Boolean standaloneDecl)
encoding
- the encoding to apply to the messageincludeEncodingDecl
- true
to include the encoding in the XML declaration, false
omits the encoding in the XML declaration.standaloneDecl
- true
to include standalone="yes"
in the XML declaration,
false
to include standalone="no"
in the XML declaration, null
to exclude
the standalone attribute from the XML declaration,public MessageOptions(char indentChar, int indentCount, String newLine)
indentChar
- the whitespace character to use for indenting XML.indentCount
- how many indentChars to indent by, disable
indentation if negative (zero means new line only)newLine
- sequence of characters used for a line ending
(null
means use the single character '\n')public MessageOptions(XmlEncoding encoding, char indentChar, int indentCount, String newLine)
encoding
- the encoding to apply to the messageindentChar
- the whitespace character to use for indenting XML.indentCount
- how many indentChars to indent by, disable
indentation if negative (zero means new line only)newLine
- sequence of characters used for a line ending
(null
means use the single character '\n')public MessageOptions(XmlEncoding encoding, boolean includeEncodingDecl, Boolean standaloneDecl, char indentChar, int indentCount, String newLine)
encoding
- the encoding to apply to the messageincludeEncodingDecl
- true
to include the encoding in the XML declaration, false
omits the encoding in the XML declaration.standaloneDecl
- true
to include standalone="yes"
in the XML declaration,
false
to include standalone="no"
in the XML declaration, null
to exclude
the standalone attribute from the XML declarationindentChar
- the whitespace character to use for indenting XMLindentCount
- how many indentChars to indent by, disable
indentation if negative (zero means new line only)newLine
- sequence of characters used for a line ending
(null
means use the single character '\n')Method Detail |
---|
public XmlEncoding getEncoding()
public void setEncoding(XmlEncoding encoding)
encoding
- to usepublic String getOutMediaTypeCode()
public void setOutMediaTypeCode(String code)
code
- media type short code (e.g. "xml" or "x-xbis")public String[] getInMediaTypeCodes()
null
if unspecified)public void setInMediaTypeCodes(String[] codes)
codes
- accepted media type short codes (e.g. "xml", "x-xbis") (null
if unspecified)public int getIndentCount()
public void setIndentCount(int indentCount)
indentCount
- the number of indent characterspublic char getIndentChar()
public void setIndentChar(char indentChar)
indentChar
- the indent characterpublic String getNewLine()
public void setNewLine(String newLine)
newLine
- the new line separatorpublic Boolean getStandaloneDecl()
true
to include standalone="yes"
in the XML declaration,
false
to include standalone="no"
in the XML declaration, null
to exclude
the standalone attribute from the XML declaration,public void setStandaloneDecl(Boolean standaloneDecl)
standaloneDecl
- true
to include standalone="yes"
in the XML declaration,
false
to include standalone="no"
in the XML declaration, null
to exclude
the standalone attribute from the XML declaration,public boolean isIncludeEncodingDecl()
true
to include the encoding in the XML declaration, false
to omit the encoding
in the XML declaration.public void setIncludeEncodingDecl(boolean includeEncodingDecl)
includeEncodingDecl
- true
to include the encoding in the XML declaration, false
to omit the encoding in the XML declaration.public String getEncodingDeclString()
null
for no encoding attribute.public String getStandaloneDeclString()
null
for no standalone attribute.public XmlOptions getXmlOptions()
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |