public abstract class ExportFileTask extends ProgressTask
| Modifier and Type | Class and Description |
|---|---|
static interface |
ExportFileTask.Callback |
protected static interface |
ExportFileTask.FileProgressCallback |
| Modifier and Type | Field and Description |
|---|---|
protected ExportFileTask.Callback |
_callback |
protected AbstractSheet |
_item |
protected java.util.List<java.io.File> |
_outputFiles |
protected boolean |
_wrap180 |
_context, _mapView| Constructor and Description |
|---|
ExportFileTask(MapView mapView,
AbstractSheet item,
ExportFileTask.Callback callback) |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
addFile(java.util.zip.ZipOutputStream zos,
java.io.File file,
java.lang.String filename,
byte[] buf,
ExportFileTask.FileProgressCallback cb) |
protected void |
addOutputFile(java.io.File f) |
protected static void |
appendStream(java.io.File file,
java.io.OutputStream os,
byte[] buf,
ExportFileTask.FileProgressCallback cb) |
protected static void |
copyFile(java.lang.String filePath,
java.io.File dir) |
protected java.util.List<java.io.File> |
getOutputFiles() |
protected void |
onCancelled() |
protected void |
onPostExecute(java.lang.Object ret) |
protected static boolean |
writeToFile(java.io.File file,
java.lang.String... lines) |
protected static java.io.File |
zipDirectory(java.io.File dir,
java.io.File dest,
ExportFileTask.FileProgressCallback cb)
Compress the directory contents into a ZIP file
Copied out of FileSystemUtils with added callback functionality
|
getProgressMessage, getProgressStages, onClick, onPreExecute, onProgressUpdate, progress, progress, setProgressMessage, toastprotected final ExportFileTask.Callback _callback
protected final boolean _wrap180
protected final AbstractSheet _item
protected final java.util.List<java.io.File> _outputFiles
public ExportFileTask(MapView mapView, AbstractSheet item, ExportFileTask.Callback callback)
protected void addOutputFile(java.io.File f)
protected java.util.List<java.io.File> getOutputFiles()
protected void onPostExecute(java.lang.Object ret)
onPostExecute in class ProgressTaskprotected void onCancelled()
onCancelled in class android.os.AsyncTask<java.lang.Void,java.lang.Integer,java.lang.Object>protected static java.io.File zipDirectory(java.io.File dir,
java.io.File dest,
ExportFileTask.FileProgressCallback cb)
throws java.io.IOException
java.io.IOExceptionprotected static void addFile(java.util.zip.ZipOutputStream zos,
java.io.File file,
java.lang.String filename,
byte[] buf,
ExportFileTask.FileProgressCallback cb)
protected static void appendStream(java.io.File file,
java.io.OutputStream os,
byte[] buf,
ExportFileTask.FileProgressCallback cb)
protected static boolean writeToFile(java.io.File file,
java.lang.String... lines)
protected static void copyFile(java.lang.String filePath,
java.io.File dir)