public class OutputStreamCodeWriter extends CodeWriter
encoding| Constructor | Description |
|---|---|
OutputStreamCodeWriter(java.io.OutputStream os,
java.lang.String encoding) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
Called by CodeModel at the end of the process.
|
java.io.OutputStream |
openBinary(JPackage pkg,
java.lang.String fileName) |
Called by CodeModel to store the specified file.
|
openSourcepublic OutputStreamCodeWriter(java.io.OutputStream os,
java.lang.String encoding)
os - This stream will be closed at the end of the code generation.public java.io.OutputStream openBinary(JPackage pkg, java.lang.String fileName) throws java.io.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"java.io.IOExceptionpublic void close()
throws java.io.IOException
CodeWriterclose in class CodeWriterjava.io.IOExceptionCopyright © 2018 Oracle Corporation. All rights reserved.