com.sun.codemodel.writer
public class SingleStreamCodeWriter extends CodeWriter
Constructor and Description |
---|
SingleStreamCodeWriter(java.io.OutputStream os) |
Modifier and Type | Method and 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.
|
openSource
public SingleStreamCodeWriter(java.io.OutputStream os)
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
CodeWriter
The 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 CodeWriter
pkg
- The package of the file to be written.fileName
- File name without the path. Something like
"Foo.java" or "Bar.properties"java.io.IOException
public void close() throws java.io.IOException
CodeWriter
close
in class CodeWriter
java.io.IOException
Copyright © 2005-2014 Sun Microsystems. All Rights Reserved.