public class FilerCodeWriter extends CodeWriter
encoding| Constructor and Description |
|---|
FilerCodeWriter(Options options) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Called by CodeModel at the end of the process.
|
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 FilerCodeWriter(Options options) throws IOException
IOExceptionpublic OutputStream openBinary(JPackage pkg, String fileName) throws IOException
CodeWriterThe 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.
openBinary in class CodeWriterpkg - 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
CodeWriterThe 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.
openSource in class CodeWriterpkg - The package of the file to be written.fileName - File name without the path. Something like
"Foo.java" or "Bar.properties"IOExceptionpublic void close()
throws IOException
CodeWriterclose in class CodeWriterIOExceptionCopyright © 2005–2018 Oracle Corporation. All rights reserved.