|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.android.ddmlib.SyncService
public final class SyncService
Sync service class to push/pull to/from devices/emulators, through the debug bridge.
To get aSyncService object, use Device.getSyncService().
| Nested Class Summary | |
|---|---|
static interface |
SyncService.ISyncProgressMonitor
Classes which implement this interface provide methods that deal with displaying transfer progress. |
| Method Summary | |
|---|---|
void |
close()
Closes the connection. |
static SyncService.ISyncProgressMonitor |
getNullProgressMonitor()
Returns a sync progress monitor that does nothing. |
void |
pull(FileListingService.FileEntry[] entries,
java.lang.String localPath,
SyncService.ISyncProgressMonitor monitor)
Pulls file(s) or folder(s). |
void |
pullFile(FileListingService.FileEntry remote,
java.lang.String localFilename,
SyncService.ISyncProgressMonitor monitor)
Pulls a single file. |
void |
pullFile(java.lang.String remoteFilepath,
java.lang.String localFilename,
SyncService.ISyncProgressMonitor monitor)
Pulls a single file. |
void |
push(java.lang.String[] local,
FileListingService.FileEntry remote,
SyncService.ISyncProgressMonitor monitor)
Push several files. |
void |
pushFile(java.lang.String local,
java.lang.String remote,
SyncService.ISyncProgressMonitor monitor)
Push a single file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void close()
public static SyncService.ISyncProgressMonitor getNullProgressMonitor()
SyncService.ISyncProgressMonitor.
This object can be reused multiple times and can be used by concurrent threads.
public void pull(FileListingService.FileEntry[] entries,
java.lang.String localPath,
SyncService.ISyncProgressMonitor monitor)
throws SyncException,
java.io.FileNotFoundException,
java.io.IOException,
TimeoutException
entries - the remote item(s) to pulllocalPath - The local destination. If the entries count is > 1 or
if the unique entry is a folder, this should be a folder.monitor - The progress monitor. Cannot be null.
SyncException
java.io.FileNotFoundException - if the file exists but is a directory, does not exist but
cannot be created, or cannot be opened for any other reason.
java.io.IOException
TimeoutExceptionFileListingService.FileEntry,
getNullProgressMonitor()
public void pullFile(FileListingService.FileEntry remote,
java.lang.String localFilename,
SyncService.ISyncProgressMonitor monitor)
throws java.io.FileNotFoundException,
java.io.IOException,
SyncException,
TimeoutException
remote - the remote filelocalFilename - The local destination.monitor - The progress monitor. Cannot be null.
SyncException
java.io.IOException
java.io.FileNotFoundException
TimeoutExceptionFileListingService.FileEntry,
getNullProgressMonitor()
public void pullFile(java.lang.String remoteFilepath,
java.lang.String localFilename,
SyncService.ISyncProgressMonitor monitor)
throws TimeoutException,
java.io.IOException,
SyncException
FileListingService.FileEntry, the size of the file being pulled is unknown and the
SyncService.ISyncProgressMonitor will not properly show the progress
remoteFilepath - the full path to the remote filelocalFilename - The local destination.monitor - The progress monitor. Cannot be null.
java.io.IOException - in case of an IO exception.
TimeoutException - in case of a timeout reading responses from the device.
SyncException - in case of a sync exception.getNullProgressMonitor()
public void push(java.lang.String[] local,
FileListingService.FileEntry remote,
SyncService.ISyncProgressMonitor monitor)
throws SyncException,
java.io.FileNotFoundException,
java.io.IOException,
TimeoutException
local - An array of loca files to pushremote - the remote FileListingService.FileEntry representing a directory.monitor - The progress monitor. Cannot be null.
SyncException
java.io.FileNotFoundException - if the file exists but is a directory, does not exist but
cannot be created, or cannot be opened for any other reason.
java.io.IOException
TimeoutException
public void pushFile(java.lang.String local,
java.lang.String remote,
SyncService.ISyncProgressMonitor monitor)
throws SyncException,
java.io.FileNotFoundException,
java.io.IOException,
TimeoutException
local - the local filepath.remote - The remote filepath.monitor - The progress monitor. Cannot be null.
SyncException
java.io.FileNotFoundException - if the file exists but is a directory, does not exist but
cannot be created, or cannot be opened for any other reason.
java.io.IOException
TimeoutException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||