Skip to content

Commit

Permalink
testcontainers#291 debug (4)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsideup committed Feb 21, 2017
1 parent f8a2c03 commit fa7e9d9
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,27 +89,27 @@ InetSocketAddress start() throws IOException {
executorService.submit(() -> {
try (RandomAccessFile randomAccessFile = new RandomAccessFile(file, "rw")) {
log.info("Created RandomAccessFile from " + file);
Future<Long> inputFuture = executorService.submit(() -> {
Future<Integer> inputFuture = executorService.submit(() -> {
try (
InputStream in = incomingSocket.getInputStream();
FileOutputStream out = new FileOutputStream(randomAccessFile.getFD())
) {
return IOUtils.copyLarge(in, out);
return IOUtils.copy(in, out);
} catch (Exception e) {
log.warn("", e);
return null;
return -1;
}
});

Future<Long> outputFuture = executorService.submit(() -> {
Future<Integer> outputFuture = executorService.submit(() -> {
try (
FileInputStream in = new FileInputStream(randomAccessFile.getFD());
OutputStream out = incomingSocket.getOutputStream()
) {
return IOUtils.copyLarge(in, out);
return IOUtils.copy(in, out);
} catch (Exception e) {
log.warn("", e);
return null;
return -1;
}
});

Expand Down

0 comments on commit fa7e9d9

Please sign in to comment.