Java – get the POI Workbook of InputStream for OM Apache
•
Java
Is there any way to get the InputStream of Apache POI workbook?
I need it to pipe to another OutputStream, but I can't find such a method (if it exists)
If not, any tips on alternative ways to get it?
Solution
There are several ways to solve this problem:
>You can use standard Java pipetinputstream and pipedoutputstream However, you must create different threads for using pipedinputstream (such as http://docs.oracle.com/javase/7/docs/api/java/io/PipedInputStream.html You can write content to bytearrayoutputstream, and then you can use the resulting byte array through bytearrayinputstream This can be done sequentially in one thread
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码