@Test @SneakyThrows void writeByteByByteNoChunked() { writeByteByByte(shortChunk); tested.close(); verify(executorService, never()).submit(any(UploadChunkResultCallable.class)); assertThat(bytesSentDirectly.getValue()).hasContent(new String(shortChunk)); }
@Override @Synchronized public void close() throws IOException { if (currentOutputStream == null) { return; } if (isMultiPartUpload()) { finishMultiPartUpload(); } else { finishSimpleUpload(); } }
MultipartUploadS3StorageOutputStream extends OutputStream { @Override @Synchronized public void close() throws IOException { if (currentOutputStream == null) { return; } if (isMultiPartUpload()) { finishMultiPartUpload(); } else { finishSimpleUpload(); } } }
MultipartUploadS3StorageOutputStream extends OutputStream { @Override @Synchronized public void close() throws IOException { if (currentOutputStream == null) { return; } if (isMultiPartUpload()) { finishMultiPartUpload(); } else { finishSimpleUpload(); } } MultipartUploadS3StorageOutputStream(String bucketName, String objectKey, AmazonS3 amazonS3,
                                         ExecutorService executorService,
                                         List<? extends ResourceWriteCallback> callbacks); }
MultipartUploadS3StorageOutputStream extends OutputStream { @Override @Synchronized public void close() throws IOException { if (currentOutputStream == null) { return; } if (isMultiPartUpload()) { finishMultiPartUpload(); } else { finishSimpleUpload(); } } MultipartUploadS3StorageOutputStream(String bucketName, String objectKey, AmazonS3 amazonS3,
                                         ExecutorService executorService,
                                         List<? extends ResourceWriteCallback> callbacks); @Override @Synchronized void write(byte[] bytes, int off, int len); @Override @Synchronized void write(int b); @Override @Synchronized void close(); }
MultipartUploadS3StorageOutputStream extends OutputStream { @Override @Synchronized public void close() throws IOException { if (currentOutputStream == null) { return; } if (isMultiPartUpload()) { finishMultiPartUpload(); } else { finishSimpleUpload(); } } MultipartUploadS3StorageOutputStream(String bucketName, String objectKey, AmazonS3 amazonS3,
                                         ExecutorService executorService,
                                         List<? extends ResourceWriteCallback> callbacks); @Override @Synchronized void write(byte[] bytes, int off, int len); @Override @Synchronized void write(int b); @Override @Synchronized void close();  }