@Override public Void invoke(File f, VirtualChannel channel) throws IOException, InterruptedException { try (InputStream fis = Files.newInputStream(fileToPath(reading(f))); OutputStream out = p.getOut()) { org.apache.commons.io.IOUtils.copy(fis, out); } catch (Exception x) { p.error(x); } return null; } }
@Override public Void invoke(File f, VirtualChannel channel) throws IOException, InterruptedException { try (InputStream fis = Files.newInputStream(reading(f).toPath()); OutputStream out = p.getOut()) { org.apache.commons.io.IOUtils.copy(fis, out); } catch (InvalidPathException e) { p.error(new IOException(e)); } catch (Exception x) { p.error(x); } return null; } });