public class XmlWriterUtil
extends java.lang.Object
XmlWriter class.| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_COLUMN_LINE
The default column before line wrapping i.e.
|
static int |
DEFAULT_INDENTATION_SIZE
The default line indenter size i.e.
|
static java.lang.String |
LS
The vm line separator
|
| Constructor and Description |
|---|
XmlWriterUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
writeComment(XMLWriter writer,
java.lang.String comment)
Convenience method to write XML comment line.
|
static void |
writeComment(XMLWriter writer,
java.lang.String comment,
int indent)
Convenience method to write XML comment line.
|
static void |
writeComment(XMLWriter writer,
java.lang.String comment,
int indent,
int indentSize)
Convenience method to write XML comment line.
|
static void |
writeComment(XMLWriter writer,
java.lang.String comment,
int indent,
int indentSize,
int columnSize)
Convenience method to write XML comment line.
|
static void |
writeCommentLineBreak(XMLWriter writer)
Convenience method to write XML comment line break.
|
static void |
writeCommentLineBreak(XMLWriter writer,
int columnSize)
Convenience method to write XML comment line break with
columnSize as length. |
static void |
writeCommentText(XMLWriter writer,
java.lang.String comment)
Convenience method to write XML comments between two comments line break.
|
static void |
writeCommentText(XMLWriter writer,
java.lang.String comment,
int indent)
Convenience method to write XML comments between two comments line break.
|
static void |
writeCommentText(XMLWriter writer,
java.lang.String comment,
int indent,
int indentSize)
Convenience method to write XML comment between two comment line break.
|
static void |
writeCommentText(XMLWriter writer,
java.lang.String comment,
int indent,
int indentSize,
int columnSize)
Convenience method to write XML comments between two comments line break.
|
static void |
writeLineBreak(XMLWriter writer)
Convenience method to write one
CRLF. |
static void |
writeLineBreak(XMLWriter writer,
int repeat)
Convenience method to repeat
CRLF. |
static void |
writeLineBreak(XMLWriter writer,
int repeat,
int indent)
Convenience method to repeat
CRLF and to indent the writer by 2. |
static void |
writeLineBreak(XMLWriter writer,
int repeat,
int indent,
int indentSize)
Convenience method to repeat
CRLF and to indent the writer by indentSize. |
public static final java.lang.String LS
public static final int DEFAULT_INDENTATION_SIZE
public static final int DEFAULT_COLUMN_LINE
public static void writeLineBreak(XMLWriter writer) throws java.io.IOException
CRLF.writer - not null writerjava.io.IOException - if writing fails.public static void writeLineBreak(XMLWriter writer, int repeat) throws java.io.IOException
CRLF.writer - not nullrepeat - positive numberjava.io.IOException - if writing fails.public static void writeLineBreak(XMLWriter writer, int repeat, int indent) throws java.io.IOException
CRLF and to indent the writer by 2.writer - not nullrepeat - The number of repetitions of the indentindent - positive numberjava.io.IOException - if writing fails.DEFAULT_INDENTATION_SIZE,
writeLineBreak(XMLWriter, int, int, int)public static void writeLineBreak(XMLWriter writer, int repeat, int indent, int indentSize) throws java.io.IOException
CRLF and to indent the writer by indentSize.writer - not nullrepeat - The number of repetitions of the indentindent - positive numberindentSize - positive numberjava.io.IOException - if writing fails.public static void writeCommentLineBreak(XMLWriter writer) throws java.io.IOException
80.writer - not nulljava.io.IOException - if writing fails.DEFAULT_COLUMN_LINE,
writeCommentLineBreak(XMLWriter, int)public static void writeCommentLineBreak(XMLWriter writer, int columnSize) throws java.io.IOException
columnSize as length.writer - not nullcolumnSize - positive numberjava.io.IOException - if writing fails.public static void writeComment(XMLWriter writer, java.lang.String comment) throws java.io.IOException
comment is splitted to have a size of
80.writer - not nullcomment - The comment to writejava.io.IOException - if writing fails.DEFAULT_INDENTATION_SIZE,
writeComment(XMLWriter, String, int, int)public static void writeComment(XMLWriter writer, java.lang.String comment, int indent) throws java.io.IOException
comment is split to have a size of
80 and is indented by indent using 2 as indentation size.writer - not nullcomment - The comment to writeindent - positive numberjava.io.IOException - if writing fails.DEFAULT_INDENTATION_SIZE,
writeComment(XMLWriter, String, int, int)public static void writeComment(XMLWriter writer, java.lang.String comment, int indent, int indentSize) throws java.io.IOException
comment is split to have a size of 80
and is indented by indent using indentSize.writer - not nullcomment - The comment to writeindent - positive numberindentSize - positive numberjava.io.IOException - if writing fails.DEFAULT_COLUMN_LINE,
writeComment(XMLWriter, String, int, int, int)public static void writeComment(XMLWriter writer, java.lang.String comment, int indent, int indentSize, int columnSize) throws java.io.IOException
comment is split to have a size of
columnSize and is indented by indent using indentSize.writer - not nullcomment - The comment to writeindent - positive numberindentSize - positive numbercolumnSize - positive numberjava.io.IOException - if writing fails.public static void writeCommentText(XMLWriter writer, java.lang.String comment) throws java.io.IOException
writer - not nullcomment - The comment to writejava.io.IOException - if writing fails.DEFAULT_INDENTATION_SIZE,
writeCommentText(XMLWriter, String, int, int)public static void writeCommentText(XMLWriter writer, java.lang.String comment, int indent) throws java.io.IOException
indent using
2 as indentation size.writer - not nullcomment - The comment to writeindent - positive numberjava.io.IOException - if writing fails.DEFAULT_INDENTATION_SIZE,
writeCommentText(XMLWriter, String, int, int)public static void writeCommentText(XMLWriter writer, java.lang.String comment, int indent, int indentSize) throws java.io.IOException
indent using indentSize.writer - not nullcomment - The comment to writeindent - positive numberindentSize - positive numberjava.io.IOException - if writing fails.DEFAULT_COLUMN_LINE,
writeCommentText(XMLWriter, String, int, int, int)public static void writeCommentText(XMLWriter writer, java.lang.String comment, int indent, int indentSize, int columnSize) throws java.io.IOException
indent using indentSize.
The column size could be also be specified.writer - not nullcomment - The comment to writeindent - positive numberindentSize - positive numbercolumnSize - positive numberjava.io.IOException - if writing fails.