public class ZipBuilder extends Object
| Constructor and Description |
|---|
ZipBuilder() |
| Modifier and Type | Method and Description |
|---|---|
ByteBuffer |
dump()
Closes active stream.
|
void |
writeEntry(String name,
byte[] content)
Creates new ZIP archive entry.
|
void |
writeEntry(String name,
InputStream stream)
Creates new ZIP archive entry.
|
public void writeEntry(String name, byte[] content) throws IOException
name - Entry name.content - Binary content of the file.IOException - When writing content to archive fails.public void writeEntry(String name, InputStream stream) throws IOException
name - Entry name.stream - Content source.IOException - When writing content to archive fails.public ByteBuffer dump() throws IOException
IOException - When dumping ZIP stream fails.Copyright © 2018–2019 RafaĆ Wrzeszcz - Wrzasq.pl. All rights reserved.