public class OutputStreamCodeWriter extends AbstractCodeWriter
| Constructor and Description |
|---|
OutputStreamCodeWriter(OutputStream os,
Charset encoding) |
| 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.
|
encoding, openSourcepublic OutputStreamCodeWriter(@Nonnull OutputStream os, @Nullable Charset encoding)
os - This stream will be closed at the end of the code generation.encoding - Encoding to be used.public OutputStream openBinary(@Nonnull JPackage pkg, @Nonnull String fileName) throws IOException
AbstractCodeWriteropenBinary in class AbstractCodeWriterpkg - The package of the file to be written.fileName - File name without the path. Something like "Foo.java" or
"Bar.properties"IOException - On IO errorpublic void close()
throws IOException
AbstractCodeWriterclose in interface Closeableclose in interface AutoCloseableclose in class AbstractCodeWriterIOExceptionCopyright © 2013–2015 Philip Helger. All rights reserved.