public interface FileTreeReader
extends java.lang.AutoCloseable
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
default @NotNull team.unnamed.creative.base.Readable |
content()
Returns the current entry's data as a
Readable. |
static FileTreeReader |
directory(java.io.File root) |
boolean |
hasNext() |
default @NotNull java.io.InputStream |
input()
Deprecated.
Use
stream() instead |
java.lang.String |
next() |
@NotNull java.io.InputStream |
stream()
Returns the current entry's data as an input stream.
|
static @NotNull FileTreeReader |
zip(@NotNull java.util.zip.ZipFile zipFile)
Creates a new
FileTreeReader from the given ZipFile. |
static FileTreeReader |
zip(java.util.zip.ZipInputStream zip) |
boolean hasNext()
java.lang.String next()
@NotNull @NotNull java.io.InputStream stream()
The returned input stream has a short lifetime and will be closed when next() is called again.
To store any content of the entry use the content()
method.
@NotNull default @NotNull team.unnamed.creative.base.Readable content()
Readable.
The returned readable instance can be used to store the entry's content.
@Deprecated @ApiStatus.ScheduledForRemoval(inVersion="2.0.0") @NotNull default @NotNull java.io.InputStream input()
stream() insteadThe returned input stream has a short lifetime and will be closed when next() is called again.
To store any content of the entry use the content()
method.
void close()
throws java.io.IOException
close in interface java.lang.AutoCloseablejava.io.IOExceptionstatic FileTreeReader zip(java.util.zip.ZipInputStream zip)
@NotNull static @NotNull FileTreeReader zip(@NotNull @NotNull java.util.zip.ZipFile zipFile)
FileTreeReader from the given ZipFile.zipFile - The zip file to readstatic FileTreeReader directory(java.io.File root)