public abstract class AbstractDescriptorIo extends Object
Modifier | Constructor and Description |
---|---|
protected |
AbstractDescriptorIo()
Utility class should not have a public or default constructor.
|
Modifier and Type | Method and Description |
---|---|
static DocumentBuilder |
createDocumentBuilder() |
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.
|
protected AbstractDescriptorIo()
public static DocumentBuilder createDocumentBuilder() throws ParserConfigurationException
DocumentBuilder
instanceParserConfigurationException
- in case of errorpublic static void writeDescriptor(Descriptor descriptor, File file) throws IOException
descriptor
- The descriptor to serializefile
- The file to write toIOException
- If an I/O error occurspublic 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 useIOException
- If an I/O error occurspublic 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 indentedIOException
- If an I/O error occurspublic 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 indentedIOException
- If an I/O error occurspublic static File[] writeAll(J2eeDescriptor descriptor, String dir) throws IOException
descriptor
- The descriptor to serializedir
- Directory to store the descriptors inIOException
- if a I/O error occursCopyright © 2004-2013 Codehaus. All Rights Reserved.