public class ZipHelper
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private android.content.Context |
mContext
Global Application Context
|
private static ZipHelper |
sInstance |
private java.lang.String |
TAG
Class identifier
|
| Modifier | Constructor and Description |
|---|---|
private |
ZipHelper(android.content.Context context) |
| Modifier and Type | Method and Description |
|---|---|
(package private) byte[] |
createContents(java.lang.String filename,
byte[] contents)
Create the contents of a zip file with one file
|
(package private) byte[] |
extractContents(java.lang.String filename,
java.io.BufferedInputStream bis)
Extract the data for a file from a ZipFile
|
static ZipHelper |
INST(android.content.Context context)
Lazily create our instance
|
private static ZipHelper sInstance
private final android.content.Context mContext
private final java.lang.String TAG
public static ZipHelper INST(@NonNull android.content.Context context)
context - any old context@Nullable
byte[] createContents(@NonNull
java.lang.String filename,
@NonNull
byte[] contents)
throws java.io.IOException
filename - name of file to addcontents - contents of file to addjava.io.IOException@Nullable
byte[] extractContents(@NonNull
java.lang.String filename,
@NonNull
java.io.BufferedInputStream bis)
filename - file to extractbis - zip file contents