public class IOUtils
extends java.lang.Object
Constructor and Description |
---|
IOUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
addAttribute(org.xml.sax.helpers.AttributesImpl ai,
java.lang.String name,
java.lang.Object value)
Helper method to add an attribute.
|
static org.xml.sax.ContentHandler |
getSerializer(java.io.File file)
Get a serializer to write XML to a file.
|
static void |
indent(org.xml.sax.ContentHandler ch,
int level)
Helper method to indent the xml elements.
|
static void |
newline(org.xml.sax.ContentHandler ch)
Helper method to create a new line.
|
static void |
parse(java.io.InputStream file,
org.xml.sax.ContentHandler handler)
Parse a file and send the sax events to the content handler.
|
static void |
text(org.xml.sax.ContentHandler ch,
java.lang.String text)
Helper method writing out a string.
|
public static final void parse(java.io.InputStream file, org.xml.sax.ContentHandler handler) throws javax.xml.transform.TransformerException
file
- handler
- javax.xml.transform.TransformerException
public static org.xml.sax.ContentHandler getSerializer(java.io.File file) throws javax.xml.transform.TransformerException, java.io.IOException
javax.xml.transform.TransformerException
java.io.IOException
public static void addAttribute(org.xml.sax.helpers.AttributesImpl ai, java.lang.String name, java.lang.Object value)
ai
- The attributes impl receiving the additional attribute.name
- The name of the attribute.value
- The value of the attribute.public static void text(org.xml.sax.ContentHandler ch, java.lang.String text) throws org.xml.sax.SAXException
ch
- The content handler.text
- org.xml.sax.SAXException
public static void indent(org.xml.sax.ContentHandler ch, int level) throws org.xml.sax.SAXException
ch
- The content handler.level
- The level of indention.org.xml.sax.SAXException
public static void newline(org.xml.sax.ContentHandler ch) throws org.xml.sax.SAXException
ch
- The content handler.org.xml.sax.SAXException
Copyright © 2006-2014 The Apache Software Foundation. All Rights Reserved.