public class SourceOutputStream
extends java.io.FileOutputStream
Modifier and Type | Method and Description |
---|---|
static SourceOutputStream |
getStream(java.lang.String fileName,
boolean overwrite)
Get an output stream with a file name.
|
static SourceOutputStream |
getStream(java.lang.String root,
java.lang.String packageName,
java.lang.String fileName,
boolean overwrite)
Get an output stream with a output root directory, the name of the
package which the output class is in, and an output file name.
|
public static SourceOutputStream getStream(java.lang.String root, java.lang.String packageName, java.lang.String fileName, boolean overwrite) throws java.io.IOException
root
- The root of the output class.packageName
- The name of the package which the output class is
in.fileName
- The name of the file. It may contain path information,
but only the simple file name is used.overwrite
- Whether to an overwrite existing file, if any.java.io.IOException
- If error occurs when creating the output stream.
An IOException
is thrown if overwrite is
falseand the output file already exists; FileNotFoundException
is thrown if the output file cannot be created
for other reasons.public static SourceOutputStream getStream(java.lang.String fileName, boolean overwrite) throws java.io.IOException
fileName
- The output file name.overwrite
- Whether to an overwrite existing file, if any.java.io.IOException
- If error occurs when creating the output stream.
An IOException
is thrown if overwrite is
falseand the output file already exists; FileNotFoundException
is thrown if the output file cannot be created
for other reasons.