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

How to use
MultipartPart
in
org.jets3t.service.model

Best Java code snippets using org.jets3t.service.model.MultipartPart (Showing top 20 results out of 315)

origin: net.java.dev.jets3t/jets3t

public MultipartPart getMultipartPart() {
  return new MultipartPart(partNumber, lastModified, etag, size);
}
origin: net.java.dev.jets3t/jets3t

@Override
public String toString() {
  return this.getClass().getName() + " ["
    + "partNumber=" + getPartNumber()
    + ", lastModified=" + getLastModified()
    + ", etag=" + getEtag()
    + ", size=" + getSize()
    + "]";
}
origin: net.java.dev.jets3t/jets3t

@Override
public boolean equals(Object other) {
  if (other == this) {
    return true;
  }
  if (other instanceof MultipartPart) {
    MultipartPart p = (MultipartPart) other;
    return Arrays.equals(
        new Object[]{ partNumber, lastModified, size},
        new Object[]{ p.partNumber, p.lastModified, p.size} ) &&
        sameEtag(p.etag);
  }
  return false;
}
origin: iterate-ch/cyberduck

  @Override
  public MultipartPart call() throws BackgroundException {
    try {
      final HttpRange range = HttpRange.byLength(offset, length);
      final MultipartPart part = session.getClient().multipartUploadPartCopy(multipart, partNumber,
        containerService.getContainer(source).getName(), containerService.getKey(source),
        null, null, null, null, range.getStart(), range.getEnd(), source.attributes().getVersionId());
      if(log.isInfoEnabled()) {
        log.info(String.format("Received response %s for part number %d", part, partNumber));
      }
      // Populate part with response data that is accessible via the object's metadata
      return new MultipartPart(partNumber,
        null == part.getLastModified() ? new Date(System.currentTimeMillis()) : part.getLastModified(),
        null == part.getEtag() ? StringUtils.EMPTY : part.getEtag(),
        part.getSize());
    }
    catch(S3ServiceException e) {
      throw new S3ExceptionMappingService().map("Cannot copy {0}", e, source);
    }
  }
});
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

  return new MultipartPart(partNumber, part.getLastModified(), part.getEtag(), -1l);
} catch (ServiceException se) {
  throw new S3ServiceException(se);
origin: iterate-ch/cyberduck

    if(c.getPartNumber().equals(partNumber)) {
      if(log.isInfoEnabled()) {
        log.info(String.format("Skip completed part number %d", partNumber));
      offset += c.getSize();
      break;
final StringBuilder concat = new StringBuilder();
for(MultipartPart part : completed) {
  concat.append(part.getEtag());
origin: net.java.dev.jets3t/jets3t

for (MultipartPart part: sortedParts) {
  builder.e("Part")
    .e("PartNumber").t(String.valueOf(part.getPartNumber())).up()
    .e("ETag").t(part.getEtag());
origin: net.java.dev.jets3t/jets3t

  public int compare(MultipartPart o1, MultipartPart o2){
    if (o1 == o2){
      return 0;
    }
    if (o1 == null) {
      return -1;
    }
    if (o2 == null) {
      return 1;
    }
    return o1.getPartNumber().compareTo(o2.getPartNumber());
  }
} //PartNumberComparator
origin: iterate-ch/cyberduck

final StringBuilder concat = new StringBuilder();
for(MultipartPart part : completed) {
  concat.append(part.getEtag());
origin: iterate-ch/cyberduck

/**
 * @return No Content-Range support
 */
@Override
public Append append(final Path file, final Long length, final Cache<Path> cache) throws BackgroundException {
  if(length >= preferences.getLong("s3.upload.multipart.threshold")) {
    if(preferences.getBoolean("s3.upload.multipart")) {
      try {
        final List<MultipartUpload> upload = multipartService.find(file);
        if(!upload.isEmpty()) {
          Long size = 0L;
          for(MultipartPart completed : multipartService.list(upload.iterator().next())) {
            size += completed.getSize();
          }
          return new Append(size);
        }
      }
      catch(AccessDeniedException | InteroperabilityException e) {
        log.warn(String.format("Ignore failure listing incomplete multipart uploads. %s", e.getDetail()));
      }
    }
  }
  if(finder.withCache(cache).find(file)) {
    final PathAttributes attr = attributes.withCache(cache).find(file);
    return new Append(false, true).withSize(attr.getSize()).withChecksum(attr.getChecksum());
  }
  return Write.notfound;
}
origin: net.java.dev.jets3t/jets3t

  return new MultipartPart(partNumber, part.getLastModified(), part.getEtag(), -1l);
} catch (ServiceException se) {
  throw new S3ServiceException(se);
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

for (MultipartPart part: sortedParts) {
  builder.e("Part")
    .e("PartNumber").t(String.valueOf(part.getPartNumber())).up()
    .e("ETag").t(part.getEtag());
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

  public int compare(MultipartPart o1, MultipartPart o2){
    if (o1 == o2){
      return 0;
    }
    if (o1 == null) {
      return -1;
    }
    if (o2 == null) {
      return 1;
    }
    return o1.getPartNumber().compareTo(o2.getPartNumber());
  }
} //PartNumberComparator
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

@Override
public String toString() {
  return this.getClass().getName() + " ["
    + "partNumber=" + getPartNumber()
    + ", lastModified=" + getLastModified()
    + ", etag=" + getEtag()
    + ", size=" + getSize()
    + "]";
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

public MultipartPart getMultipartPart() {
  return new MultipartPart(partNumber, lastModified, etag, size);
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

@Override
public boolean equals(Object other) {
  if (other == this) {
    return true;
  }
  if (other instanceof MultipartPart) {
    MultipartPart p = (MultipartPart) other;
    return Arrays.equals(
        new Object[]{ partNumber, lastModified, size},
        new Object[]{ p.partNumber, p.lastModified, p.size} ) &&
        sameEtag(p.etag);
  }
  return false;
}
origin: net.java.dev.jets3t/jets3t

  return new MultipartPart(partNumber, object.getLastModifiedDate(),
    object.getETag(), object.getContentLength());
} catch (ServiceException se) {
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

  return new MultipartPart(partNumber, object.getLastModifiedDate(),
    object.getETag(), object.getContentLength());
} catch (ServiceException se) {
origin: iterate-ch/cyberduck

return new MultipartPart(partNumber,
  null == part.getLastModifiedDate() ? new Date(System.currentTimeMillis()) : part.getLastModifiedDate(),
  null == part.getETag() ? StringUtils.EMPTY : part.getETag(),
origin: iterate-ch/cyberduck

  log.debug(String.format("Saved object %s with checksum %s", file, part.getETag()));
return new MultipartPart(partNumber,
  null == part.getLastModifiedDate() ? new Date(System.currentTimeMillis()) : part.getLastModifiedDate(),
  null == part.getETag() ? StringUtils.EMPTY : part.getETag(),
org.jets3t.service.modelMultipartPart

Javadoc

Represents a Part of a MultipartUpload operation.

Most used methods

  • <init>
  • getEtag
  • getLastModified
  • getPartNumber
  • getSize
  • sameEtag

Popular in Java

  • Reactive rest calls using spring rest template
  • setRequestProperty (URLConnection)
  • getSharedPreferences (Context)
  • findViewById (Activity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • ImageIO (javax.imageio)
  • JButton (javax.swing)
  • Top 25 Plugins for Webstorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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