public class ZipCodeWriter extends AbstractCodeWriter
Constructor and Description |
---|
ZipCodeWriter(OutputStream target) |
ZipCodeWriter(OutputStream target,
String sNewLine) |
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, getNewLine, openSource
public ZipCodeWriter(@Nonnull OutputStream target)
target
- Zip file will be written to this stream.public ZipCodeWriter(@Nonnull OutputStream target, @Nonnull String sNewLine)
target
- Zip file will be written to this stream.sNewLine
- The new line string to be used for source filespublic OutputStream openBinary(@Nonnull JPackage pkg, @Nonnull String fileName) throws IOException
AbstractCodeWriter
openBinary
in class AbstractCodeWriter
pkg
- 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
AbstractCodeWriter
close
in interface Closeable
close
in interface AutoCloseable
close
in class AbstractCodeWriter
IOException
Copyright © 2013–2019 Philip Helger. All rights reserved.