Interface EntrySource
public interface EntrySource
Provides access to a single file within an archive.
- Since:
- 5.13
-
Method Summary
Modifier and TypeMethodDescription<T> Tapply(IoFunction<InputStream, T> reader) Apply theIoFunctionto the file represented by this entry and return the result.voidextractToDisk(Path target) Extract this entry to the specified target.getPath()voidread(IoConsumer<InputStream> reader) Read the file represented by this entry.
-
Method Details
-
apply
Apply theIoFunctionto the file represented by this entry and return the result.- Type Parameters:
T- type of the return value- Parameters:
reader- consumes theInputStreamfor this entry- Returns:
- the value returned by
reader - Throws:
IOException- if an error was encountered while performing IO
-
extractToDisk
Extract this entry to the specified target.- Parameters:
target- where this file will be copied- Throws:
IOException- if an error was encountered while performing IO
-
getPath
- Returns:
- location of this entry within the archive
-
read
Read the file represented by this entry.- Parameters:
reader- consumes theInputStreamfor this entry- Throws:
IOException- if an error was encountered while performing IO
-