public class FileCodeWriter extends CodeWriter
encoding| Constructor and Description |
|---|
FileCodeWriter(File target) |
FileCodeWriter(File target,
boolean readOnly) |
FileCodeWriter(File target,
boolean readOnly,
String encoding) |
FileCodeWriter(File target,
String encoding) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Called by CodeModel at the end of the process.
|
protected File |
getFile(JPackage pkg,
String fileName) |
OutputStream |
openBinary(JPackage pkg,
String fileName)
Called by CodeModel to store the specified file.
|
openSourcepublic FileCodeWriter(File target) throws IOException
IOExceptionpublic FileCodeWriter(File target, String encoding) throws IOException
IOExceptionpublic FileCodeWriter(File target, boolean readOnly) throws IOException
IOExceptionpublic FileCodeWriter(File target, boolean readOnly, String encoding) 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"IOExceptionprotected File getFile(JPackage pkg, String fileName) throws IOException
IOExceptionpublic void close()
throws IOException
CodeWriterclose in class CodeWriterIOExceptionCopyright © 2017 JBoss by Red Hat. All rights reserved.