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