|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.codehaus.cargo.module.AbstractDescriptorIo
public abstract class AbstractDescriptorIo
Provides convenience methods for reading and writing descriptors.
| Constructor Summary | |
|---|---|
protected |
AbstractDescriptorIo(DescriptorType descriptorType)
Constructor. |
| Method Summary | |
|---|---|
org.jdom.input.SAXBuilder |
createDocumentBuilder()
Create a document builder. |
org.jdom.input.SAXBuilder |
createDocumentBuilder(EntityResolver theEntityResolver)
|
protected EntityResolver |
getEntityResolver()
Get the default entity resolver for this type. |
org.jdom.Document |
parseXml(InputStream input)
Parse XML into a document. |
org.jdom.Document |
parseXml(InputStream input,
EntityResolver resolver)
Create a document from the input stream and resolver. |
static File[] |
writeAll(J2eeDescriptor descriptor,
String dir)
Writes the WebXml and its associated vendor descriptors to the specified directory. |
static void |
writeDescriptor(Descriptor descriptor,
File file)
Writes the specified document to a file. |
static void |
writeDescriptor(Descriptor descriptor,
File file,
String encoding)
Writes the specified document to a file. |
static void |
writeDescriptor(Descriptor descriptor,
File file,
String encoding,
boolean isIndent)
Writes the specified document to a file. |
static void |
writeDescriptor(Descriptor descriptor,
OutputStream out,
String encoding,
boolean isIndent)
Writes the specified document to an output stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractDescriptorIo(DescriptorType descriptorType)
descriptorType - the descriptor type.| Method Detail |
|---|
public org.jdom.input.SAXBuilder createDocumentBuilder()
createDocumentBuilder in interface DescriptorIopublic org.jdom.input.SAXBuilder createDocumentBuilder(EntityResolver theEntityResolver)
createDocumentBuilder in interface DescriptorIotheEntityResolver - entity resolver or null
DocumentBuilder instanceprotected EntityResolver getEntityResolver()
public org.jdom.Document parseXml(InputStream input)
throws org.jdom.JDOMException,
IOException
DescriptorIo
parseXml in interface DescriptorIoinput - the input stream
IOException - if problem reading the stream
org.jdom.JDOMException - if problem parsing the stream
public org.jdom.Document parseXml(InputStream input,
EntityResolver resolver)
throws org.jdom.JDOMException,
IOException
parseXml in interface DescriptorIoinput - the input streamresolver - entity resolver, or null
IOException - if problem reading the stream
org.jdom.JDOMException - if problem parsing the stream
public static void writeDescriptor(Descriptor descriptor,
File file)
throws IOException
descriptor - The descriptor to serializefile - The file to write to
IOException - If an I/O error occurs
public static void writeDescriptor(Descriptor descriptor,
File file,
String encoding)
throws IOException
descriptor - The descriptor to serializefile - The file to write toencoding - The character encoding to use
IOException - If an I/O error occurs
public static void writeDescriptor(Descriptor descriptor,
File file,
String encoding,
boolean isIndent)
throws IOException
descriptor - The descriptor to serializefile - The file to write toencoding - The character encoding to useisIndent - Whether the written XML should be indented
IOException - If an I/O error occurs
public static void writeDescriptor(Descriptor descriptor,
OutputStream out,
String encoding,
boolean isIndent)
throws IOException
descriptor - The descriptor to serializeout - The output stream to write toencoding - The character encoding to useisIndent - Whether the written XML should be indented
IOException - If an I/O error occurs
public static File[] writeAll(J2eeDescriptor descriptor,
String dir)
throws IOException
descriptor - The descriptor to serializedir - Directory to store the descriptors in
IOException - if a I/O error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||