List of usage examples for org.springframework.integration.file.remote InputStreamCallback doWithInputStream
void doWithInputStream(InputStream stream) throws IOException;
From source file:org.springframework.integration.file.remote.RemoteFileTemplate.java
@Override public boolean get(final String remotePath, final InputStreamCallback callback) { Assert.notNull(remotePath, "'remotePath' cannot be null"); return this.execute(session -> { InputStream inputStream = session.readRaw(remotePath); callback.doWithInputStream(inputStream); inputStream.close();/*from ww w.ja v a 2 s .c o m*/ return session.finalizeRaw(); }); }