|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.maven.io.MojoIoUtils
public final class MojoIoUtils
Utilities for Mojos working with IO.
Method Summary | |
---|---|
static String |
normalizeFileName(String input) Normalises the file name to be used as a URL name. |
static void |
provideDirectory(File directory) Ensures that the given directory is present and if not, creates it. |
static void |
provideMojoDirectory(File directory) Ensures that the given directory is present and if not, creates it. |
static File |
provideMojoDirectory(String dirName) Ensures that the directory with the given name is present and if not, creates it. |
static void |
provideReportDirectory(File directory) Ensures that the given directory is present and if not, creates it. |
static void |
serialize(Document document, OutputStream out) Writes the DOM document to the given stream. |
static void |
serialize(Document document, OutputStream out, boolean prettyPrint) Writes the DOM document to the given stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static File provideMojoDirectory(String dirName) throws MojoExecutionException
dirName
- the name of the directory to be created.
MojoExecutionException
- if the directory is not present and cannot be created.
public static void provideDirectory(File directory) throws IOException
directory
- the directory to be created.
IOException
- if the directory is not present and cannot be created.
public static void provideMojoDirectory(File directory) throws MojoExecutionException
directory
- the directory to be created.
MojoExecutionException
- if the directory is not present and cannot be created.
public static void provideReportDirectory(File directory) throws MavenReportException
directory
- the directory to be created.
MavenReportException
- if the directory is not present and cannot be created.
public static String normalizeFileName(String input)
input
- the file name to be normalised.
public static void serialize(Document document, OutputStream out) throws TransformerException
document
- the document to write.
out
- the stream to write to.
TransformerException
- on any problem writing to the stream.
public static void serialize(Document document, OutputStream out, boolean prettyPrint) throws TransformerException
document
- the document to write.
out
- the stream to write to.
TransformerException
- on any problem writing to the stream.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |