|
||||||||||
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 String |
DEFAULT_LINE_SEPARATOR
The default line separator ("\n" on UNIX) |
Constructor Summary | |
---|---|
XmlUtil()
|
Method Summary | |
---|---|
static boolean |
isXml(File f)
Determines if a given File shall be handled as XML. |
static void |
prettyFormat(InputStream is,
OutputStream os)
Pretty format the input stream. |
static void |
prettyFormat(InputStream is,
OutputStream os,
int indentSize,
String lineSeparator)
Pretty format the input stream. |
static void |
prettyFormat(Reader reader,
Writer writer)
Pretty format the input reader. |
static void |
prettyFormat(Reader reader,
Writer writer,
int indentSize,
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 String DEFAULT_LINE_SEPARATOR
Constructor Detail |
---|
public XmlUtil()
Method Detail |
---|
public static boolean isXml(File f)
f
- not null file
true
if the given file has XML content, false
otherwise.public static void prettyFormat(Reader reader, Writer writer) throws IOException
<div><b>content</b></div>becomes
<div> <b>content</b> </div>
reader
- not nullwriter
- not null
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(Reader reader, Writer writer, int indentSize, String lineSeparator) throws 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
IOException
- if any or invalid xml contentto read an xml content
,
to write an xml content
public static void prettyFormat(InputStream is, OutputStream os) throws IOException
<div><b>content</b></div>becomes
<div> <b>content</b> </div>
is
- not nullos
- not null
IOException
- if any or invalid xml contentprettyFormat(InputStream, OutputStream, int, String)
public static void prettyFormat(InputStream is, OutputStream os, int indentSize, String lineSeparator) throws 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
IOException
- if any or invalid xml content
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |