|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.plexus.util.xml.XmlUtil
public class XmlUtil
Common XML utilities methods.
Field Summary | |
---|---|
static int |
DEFAULT_INDENTATION_SIZE
The default line indenter size i.e. |
static java.lang.String |
DEFAULT_LINE_SEPARATOR
The default line separator ("\n" on UNIX) |
Constructor Summary | |
---|---|
XmlUtil()
|
Method Summary | |
---|---|
static boolean |
isXml(java.io.File f)
Determines if a given File shall be handled as XML. |
static void |
prettyFormat(java.io.InputStream is,
java.io.OutputStream os)
Pretty format the input stream. |
static void |
prettyFormat(java.io.InputStream is,
java.io.OutputStream os,
int indentSize,
java.lang.String lineSeparator)
Pretty format the input stream. |
static void |
prettyFormat(java.io.Reader reader,
java.io.Writer writer)
Pretty format the input reader. |
static void |
prettyFormat(java.io.Reader reader,
java.io.Writer writer,
int indentSize,
java.lang.String lineSeparator)
Pretty format the input reader. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_INDENTATION_SIZE
public static final java.lang.String DEFAULT_LINE_SEPARATOR
Constructor Detail |
---|
public XmlUtil()
Method Detail |
---|
public static boolean isXml(java.io.File f)
f
- not null file
true
if the given file has XML content, false
otherwise.public static void prettyFormat(java.io.Reader reader, java.io.Writer writer) throws java.io.IOException
<div><b>content</b></div>becomes
<div> <b>content</b> </div>
reader
- not nullwriter
- not null
java.io.IOException
- if any or invalid xml contentprettyFormat(Reader, Writer, int, String)
,
to read an xml content
,
to write an xml content
public static void prettyFormat(java.io.Reader reader, java.io.Writer writer, int indentSize, java.lang.String lineSeparator) throws java.io.IOException
<div><b>content</b></div>becomes
<div> <b>content</b> </div>
reader
- not nullwriter
- not nullindentSize
- positive number for the indentationlineSeparator
- the wanted line separator
java.io.IOException
- if any or invalid xml contentto read an xml content
,
to write an xml content
public static void prettyFormat(java.io.InputStream is, java.io.OutputStream os) throws java.io.IOException
<div><b>content</b></div>becomes
<div> <b>content</b> </div>
is
- not nullos
- not null
java.io.IOException
- if any or invalid xml contentprettyFormat(InputStream, OutputStream, int, String)
public static void prettyFormat(java.io.InputStream is, java.io.OutputStream os, int indentSize, java.lang.String lineSeparator) throws java.io.IOException
<div><b>content</b></div>becomes
<div> <b>content</b> </div>
is
- not nullos
- not nullindentSize
- positive number for the indentationlineSeparator
- the wanted line separator
java.io.IOException
- if any or invalid xml content
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |