public class StreamReadingUtils extends Object
| Constructor and Description |
|---|
StreamReadingUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
readOrThrow(InputStream inputStream,
byte[] toReadTo)
Tries to read a part of a stream and throws if it can't for whatever reason.
|
static boolean |
skipToEntry(ZipInputStream zipInputStream,
String entryName)
Attempts to find an entry with the given name in the zip file.
|
public static int readOrThrow(InputStream inputStream, byte[] toReadTo) throws IOException
inputStream - the stream to read fromtoReadTo - the byte array to read toIOException - throws on failure to readpublic static boolean skipToEntry(ZipInputStream zipInputStream, String entryName) throws IOException
zipInputStream - needs to be a fresh ZipInputStream to be able to search all entriesentryName - the name of entry to be searched forIOException - throws IOException if the zip file could not be read properlyLicensed under the Apache License 2.0 - Copyright © {inceptionYear} – 2024 the original author or authors.