Package org.codehaus.plexus.util.xml
Class XmlWriterUtil
java.lang.Object
org.codehaus.plexus.util.xml.XmlWriterUtil
Utility class for the 
XmlWriter class.- Author:
- Vincent Siveton
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intThe default column before line wrapping i.e.static final intThe default line indenter size i.e.static final StringThe vm line separator
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidwriteComment(XMLWriter writer, String comment) Convenience method to write XML comment line.static voidwriteComment(XMLWriter writer, String comment, int indent) Convenience method to write XML comment line.static voidwriteComment(XMLWriter writer, String comment, int indent, int indentSize) Convenience method to write XML comment line.static voidwriteComment(XMLWriter writer, String comment, int indent, int indentSize, int columnSize) Convenience method to write XML comment line.static voidwriteCommentLineBreak(XMLWriter writer) Convenience method to write XML comment line break.static voidwriteCommentLineBreak(XMLWriter writer, int columnSize) Convenience method to write XML comment line break withcolumnSizeas length.static voidwriteCommentText(XMLWriter writer, String comment) Convenience method to write XML comments between two comments line break.static voidwriteCommentText(XMLWriter writer, String comment, int indent) Convenience method to write XML comments between two comments line break.static voidwriteCommentText(XMLWriter writer, String comment, int indent, int indentSize) Convenience method to write XML comment between two comment line break.static voidwriteCommentText(XMLWriter writer, String comment, int indent, int indentSize, int columnSize) Convenience method to write XML comments between two comments line break.static voidwriteLineBreak(XMLWriter writer) Convenience method to write oneCRLF.static voidwriteLineBreak(XMLWriter writer, int repeat) Convenience method to repeatCRLF.static voidwriteLineBreak(XMLWriter writer, int repeat, int indent) Convenience method to repeatCRLFand to indent the writer by2.static voidwriteLineBreak(XMLWriter writer, int repeat, int indent, int indentSize) Convenience method to repeatCRLFand to indent the writer byindentSize.
- 
Field Details- 
LSThe vm line separator
- 
DEFAULT_INDENTATION_SIZEpublic static final int DEFAULT_INDENTATION_SIZEThe default line indenter size i.e. 2.- See Also:
 
- 
DEFAULT_COLUMN_LINEpublic static final int DEFAULT_COLUMN_LINEThe default column before line wrapping i.e. 80.- See Also:
 
 
- 
- 
Constructor Details- 
XmlWriterUtilpublic XmlWriterUtil()
 
- 
- 
Method Details- 
writeLineBreakConvenience method to write oneCRLF.- Parameters:
- writer- not null writer
 
- 
writeLineBreakConvenience method to repeatCRLF.- Parameters:
- writer- not null
- repeat- positive number
 
- 
writeLineBreakConvenience method to repeatCRLFand to indent the writer by2.- Parameters:
- writer- not null
- repeat- space repeat
- indent- positive number
- See Also:
 
- 
writeLineBreakConvenience method to repeatCRLFand to indent the writer byindentSize.- Parameters:
- writer- not null
- repeat- repeat time
- indent- positive number
- indentSize- positive number
 
- 
writeCommentLineBreakConvenience method to write XML comment line break. Its size is80.- Parameters:
- writer- not null
- See Also:
 
- 
writeCommentLineBreakConvenience method to write XML comment line break withcolumnSizeas length.- Parameters:
- writer- not null
- columnSize- positive number
 
- 
writeCommentConvenience method to write XML comment line. Thecommentis splitted to have a size of80.- Parameters:
- writer- not null
- comment- the comment
- See Also:
 
- 
writeCommentConvenience method to write XML comment line. Thecommentis splitted to have a size of80and is indented byindentusing2as indentation size.- Parameters:
- writer- not null
- comment- the comment
- indent- positive number
- See Also:
 
- 
writeCommentConvenience method to write XML comment line. Thecommentis splitted to have a size of80and is indented byindentusingindentSize.- Parameters:
- writer- not null
- comment- the comment
- indent- positive number
- indentSize- positive number
- See Also:
 
- 
writeCommentpublic static void writeComment(XMLWriter writer, String comment, int indent, int indentSize, int columnSize) Convenience method to write XML comment line. Thecommentis splitted to have a size ofcolumnSizeand is indented byindentusingindentSize.- Parameters:
- writer- not null
- comment- the comment
- indent- positive number
- indentSize- positive number
- columnSize- positive number
 
- 
writeCommentTextConvenience method to write XML comments between two comments line break. The XML comment block is not indented.- Parameters:
- writer- not null
- comment- the comment
- See Also:
 
- 
writeCommentTextConvenience method to write XML comments between two comments line break. The XML comment block is also indented byindentusing2as indentation size.- Parameters:
- writer- not null
- comment- the comment
- indent- positive number
- See Also:
 
- 
writeCommentTextConvenience method to write XML comment between two comment line break. The XML comment block is also indented byindentusingindentSize.- Parameters:
- writer- not null
- comment- the comment
- indent- positive number
- indentSize- positive number
- See Also:
 
- 
writeCommentTextpublic static void writeCommentText(XMLWriter writer, String comment, int indent, int indentSize, int columnSize) Convenience method to write XML comments between two comments line break. The XML comment block is also indented byindentusingindentSize. The column size could be also be specified.- Parameters:
- writer- not null
- comment- comment
- indent- positive number
- indentSize- positive number
- columnSize- positive number
 
 
-