Package com.google.api.services.drive.Drive.Files

Examples of com.google.api.services.drive.Drive.Files.Update


        if (data == null) {
          driveItem = service.files().update(item.getRemoteIdentifier(), driveItem).execute();
        } else {
          final InputStreamContent params = new InputStreamContent(FILE, new ByteArrayInputStream(data));
          params.setLength(data.length);
          Update updater = service.files().update(item.getRemoteIdentifier(), driveItem, params);
          MediaHttpUploader uploader = updater.getMediaHttpUploader();
          prepareUploader(uploader, data);
          driveItem = updater.execute();
        }
        if (driveItem == null) {
          throw new CloudsyncException("Could not update item '" + item.getPath() + "'");
        } else if (driveItem.getLabels().getTrashed()) {
          throw new CloudsyncException("Remote item '" + item.getPath() + "' [" + driveItem.getId() + "] is trashed\ntry to run with --nocache");
View Full Code Here

TOP

Related Classes of com.google.api.services.drive.Drive.Files.Update

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.