public abstract class CodeWriter extends Object
| Constructor and Description |
|---|
CodeWriter() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
close()
Called by CodeModel at the end of the process.
|
abstract OutputStream |
openBinary(JPackage pkg,
String fileName)
Called by CodeModel to store the specified file.
|
Writer |
openSource(JPackage pkg,
String fileName)
Called by CodeModel to store the specified file.
|
public abstract OutputStream openBinary(JPackage pkg, String fileName) throws IOException
The returned stream will be closed before the next file is stored. So the callee can assume that only one OutputStream is active at any given time.
pkg - The package of the file to be written.fileName - File name without the path. Something like
"Foo.java" or "Bar.properties"IOExceptionpublic Writer openSource(JPackage pkg, String fileName) throws IOException
The returned stream will be closed before the next file is stored. So the callee can assume that only one OutputStream is active at any given time.
pkg - The package of the file to be written.fileName - File name without the path. Something like
"Foo.java" or "Bar.properties"IOExceptionpublic abstract void close()
throws IOException
IOExceptionCopyright © 2005-2013 Sun Microsystems. All Rights Reserved.