public class InMemoryArchive extends Object implements MutableArchive
| Constructor and Description |
|---|
InMemoryArchive(Map<String,byte[]> entries) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
exists(String name) |
static InMemoryArchive |
fromStream(InputStream stream) |
static InMemoryArchive |
fromStrings(Map<String,String> entries) |
byte[] |
toByteArray() |
Optional<InputStream> |
tryGetInputStream(String name) |
void |
writeEntry(String path,
String content) |
public static InMemoryArchive fromStream(InputStream stream) throws IOException
IOExceptionpublic static InMemoryArchive fromStrings(Map<String,String> entries)
public Optional<InputStream> tryGetInputStream(String name) throws IOException
tryGetInputStream in interface ArchiveIOExceptionpublic void writeEntry(String path, String content)
writeEntry in interface MutableArchivepublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic byte[] toByteArray()
Copyright © 2018. All rights reserved.