Tabnine Logo
DownloadRemoteFileOperation
Code IndexAdd Tabnine to your IDE (free)

How to use
DownloadRemoteFileOperation
in
com.owncloud.android.lib.resources.files

Best Java code snippets using com.owncloud.android.lib.resources.files.DownloadRemoteFileOperation (Showing top 3 results out of 315)

origin: owncloud/android-library

private void startDownload() {
  File downFolder = new File(getCacheDir(), getString(R.string.download_folder_path));
  downFolder.mkdir();
  File upFolder = new File(getCacheDir(), getString(R.string.upload_folder_path));
  File fileToUpload = upFolder.listFiles()[0];
  String remotePath = FileUtils.PATH_SEPARATOR + fileToUpload.getName();
  DownloadRemoteFileOperation downloadOperation = new DownloadRemoteFileOperation(remotePath,
      downFolder.getAbsolutePath());
  downloadOperation.addDatatransferProgressListener(this);
  downloadOperation.execute(mClient, this, mHandler);
}
origin: owncloud/android-library

@Override
protected RemoteOperationResult run(OwnCloudClient client) {
  RemoteOperationResult result;
  /// download will be performed to a temporal file, then moved to the final location
  File tmpFile = new File(getTmpPath());
  /// perform the download
  try {
    tmpFile.getParentFile().mkdirs();
    result = downloadFile(client, tmpFile);
    Log_OC.i(TAG, "Download of " + mRemotePath + " to " + getTmpPath() + ": " +
      result.getLogMessage());
  } catch (Exception e) {
    result = new RemoteOperationResult<>(e);
    Log_OC.e(TAG, "Download of " + mRemotePath + " to " + getTmpPath() + ": " +
      result.getLogMessage(), e);
  }
  return result;
}
origin: owncloud/android-library

try {
  status = client.executeHttpMethod(mGet);
  if (isSuccess(status)) {
    targetFile.createNewFile();
    bis = new BufferedInputStream(mGet.getResponseBodyAsStream());
  result = isSuccess(status)
      ? new RemoteOperationResult<>(RemoteOperationResult.ResultCode.OK)
      : new RemoteOperationResult<>(mGet);
com.owncloud.android.lib.resources.filesDownloadRemoteFileOperation

Javadoc

Remote operation performing the download of a remote file in the ownCloud server.

Most used methods

  • <init>
  • addDatatransferProgressListener
  • downloadFile
  • execute
  • getTmpPath
  • isSuccess

Popular in Java

  • Reading from database using SQL prepared statement
  • requestLocationUpdates (LocationManager)
  • findViewById (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now