@Test public void testDecorate() throws Exception { final NullInputStream n = new NullInputStream(1L); final S3Session session = new S3Session(new Host(new S3Protocol())); assertSame(NullInputStream.class, new S3SingleUploadService(session, new S3WriteFeature(session, new S3DisabledMultipartService())).decorate(n, null).getClass()); }
@Override protected InputStream decorate(final InputStream in, final MessageDigest digest) throws IOException { if(null == digest) { log.warn("MD5 calculation disabled"); return super.decorate(in, null); } else { return new DigestInputStream(super.decorate(in, digest), digest); } }
S3SingleUploadService extends HttpUploadFeature<StorageObject, MessageDigest> { @Override protected InputStream decorate(final InputStream in, final MessageDigest digest) throws IOException { if(null == digest) { log.warn("MD5 calculation disabled"); return super.decorate(in, null); } else { return new DigestInputStream(super.decorate(in, digest), digest); } } }
S3SingleUploadService extends HttpUploadFeature<StorageObject, MessageDigest> { @Override protected InputStream decorate(final InputStream in, final MessageDigest digest) throws IOException { if(null == digest) { log.warn("MD5 calculation disabled"); return super.decorate(in, null); } else { return new DigestInputStream(super.decorate(in, digest), digest); } } S3SingleUploadService(final S3Session session, final Write<StorageObject> writer); }
S3SingleUploadService extends HttpUploadFeature<StorageObject, MessageDigest> { @Override protected InputStream decorate(final InputStream in, final MessageDigest digest) throws IOException { if(null == digest) { log.warn("MD5 calculation disabled"); return super.decorate(in, null); } else { return new DigestInputStream(super.decorate(in, digest), digest); } } S3SingleUploadService(final S3Session session, final Write<StorageObject> writer); @Override StorageObject upload(final Path file, final Local local, final BandwidthThrottle throttle,
                                final StreamListener listener, final TransferStatus status, final ConnectionCallback callback); @Override Upload<StorageObject> withWriter(final Write<StorageObject> writer); }
S3SingleUploadService extends HttpUploadFeature<StorageObject, MessageDigest> { @Override protected InputStream decorate(final InputStream in, final MessageDigest digest) throws IOException { if(null == digest) { log.warn("MD5 calculation disabled"); return super.decorate(in, null); } else { return new DigestInputStream(super.decorate(in, digest), digest); } } S3SingleUploadService(final S3Session session, final Write<StorageObject> writer); @Override StorageObject upload(final Path file, final Local local, final BandwidthThrottle throttle,
                                final StreamListener listener, final TransferStatus status, final ConnectionCallback callback); @Override Upload<StorageObject> withWriter(final Write<StorageObject> writer);  }