fabriziofortino commented on code in PR #893:
URL: https://github.com/apache/jackrabbit-oak/pull/893#discussion_r1162515105
##########
oak-run/src/main/java/org/apache/jackrabbit/oak/run/Downloader.java:
##########
@@ -175,19 +172,18 @@ public ItemResponse call() throws Exception {
Path destinationPath = Paths.get(item.destination);
Files.createDirectories(destinationPath.getParent());
+
long size = 0;
- try (ReadableByteChannel byteChannel =
Channels.newChannel(sourceUrl.getInputStream());
- FileChannel outputChannel = FileChannel.open(destinationPath,
StandardOpenOption.CREATE, StandardOpenOption.WRITE)) {
- ByteBuffer buffer = ByteBuffer.allocate(bufferSize);
+ try (InputStream inputStream = sourceUrl.getInputStream();
+ FileOutputStream outputStream = new
FileOutputStream(destinationPath.toFile())) {
Review Comment:
I have not tested it. But I have compared this solution with the previous
one based on channels and there is no performance degradation when checksum is
not enabled.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]