mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-27 09:01:38 +01:00
Add a few more comments
This commit is contained in:
parent
a0782d318b
commit
15803eedea
@ -13,6 +13,9 @@ import java.util.zip.ZipInputStream;
|
|||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Utility class for recognition and reading of ZIP archives.
|
||||||
|
*/
|
||||||
public class ZipFile {
|
public class ZipFile {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(ZipFile.class);
|
private static final Logger LOG = LoggerFactory.getLogger(ZipFile.class);
|
||||||
public static final byte[] ZIP_HEADER = new byte[]{
|
public static final byte[] ZIP_HEADER = new byte[]{
|
||||||
@ -22,16 +25,17 @@ public class ZipFile {
|
|||||||
private final byte[] zipBytes;
|
private final byte[] zipBytes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open ZIP file from byte array in memory
|
* Open ZIP file from byte array already in memory.
|
||||||
* @param zipBytes data to handle as a ZIP file
|
* @param zipBytes data to handle as a ZIP file.
|
||||||
*/
|
*/
|
||||||
public ZipFile(byte[] zipBytes) {
|
public ZipFile(byte[] zipBytes) {
|
||||||
this.zipBytes = zipBytes;
|
this.zipBytes = zipBytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open ZIP file from InputStream
|
* Open ZIP file from InputStream.<br>
|
||||||
* @param inputStream data to handle as a ZIP file
|
* This will read the entire file into memory at once.
|
||||||
|
* @param inputStream data to handle as a ZIP file.
|
||||||
*/
|
*/
|
||||||
public ZipFile(InputStream inputStream) throws IOException {
|
public ZipFile(InputStream inputStream) throws IOException {
|
||||||
this.zipBytes = readAllBytes(inputStream);
|
this.zipBytes = readAllBytes(inputStream);
|
||||||
|
Loading…
Reference in New Issue
Block a user