@Override public long importFrom(final InputStream in, final ContentClaim claim) throws IOException { final ContentClaim backupClaim = getBackupClaim(claim); if (backupClaim == null) { final ContentBlock content = getContent(claim); content.reset(); return StreamUtils.copy(in, content.write()); } else { return getBackupRepository().importFrom(in, claim); } }
long newSize = 0L; try { newSize = context.getContentRepository().importFrom(source, newClaim); bytesWritten += newSize; bytesRead += newSize;
claimLog.debug("Creating ContentClaim {} for 'importFrom' for {}", newClaim, destination); newSize = context.getContentRepository().importFrom(createTaskTerminationStream(source), newClaim); bytesWritten += newSize; } catch (final IOException e) {