public class Pinch
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
LOG_TAG |
| Constructor and Description |
|---|
Pinch(java.net.URL url)
Class constructor.
|
Pinch(java.net.URL url,
java.lang.String userAgent)
Class constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
downloadFile(ExtendedZipEntry entry)
|
void |
downloadFile(ExtendedZipEntry entry,
java.lang.String dir) |
void |
downloadFile(ExtendedZipEntry entry,
java.lang.String dir,
java.lang.String name)
Download and inflate file from a ZIP stored on a HTTP server.
|
java.util.ArrayList<ExtendedZipEntry> |
parseCentralDirectory()
Gets the list of files included in the ZIP stored on the HTTP server.
|
public Pinch(java.net.URL url)
url - The URL pointing to the ZIP file on the HTTP server.public Pinch(java.net.URL url,
java.lang.String userAgent)
url - The URL pointing to the ZIP file on the HTTP server.userAgent - User-agent to be used together with the download request.public java.util.ArrayList<ExtendedZipEntry> parseCentralDirectory()
public void downloadFile(ExtendedZipEntry entry) throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundExceptionjava.io.IOExceptionpublic void downloadFile(ExtendedZipEntry entry, java.lang.String dir) throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundExceptionjava.io.IOExceptionpublic void downloadFile(ExtendedZipEntry entry, java.lang.String dir, java.lang.String name) throws java.io.IOException
entry - Entry representing file to download.name - Path where to store the downloaded file.java.io.IOException - If an error occurred while reading from network or writing to disk.