session.read(flowFile, new InputStreamCallback() { @Override public void process(final InputStream in) throws IOException { final InputStream bin = new BufferedInputStream(in); System.out.println(bin); } });
The content read out is always empty.
If you want to read the content, you can take the following methods
System.out.println(IOUtils.toString(in,Charset.defaultCharset()));
But I want to introduce the common-io package of apache
<dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> </dependency>