-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I use Version 7.0.2. When I upload xml file, and use the media.getStreamData() and media.getByteData() will have problem. I want to get the file InputStream and byte[] to calculate the file size and save file. Please help me to solve this Problem. Thanks.
Hello drive55555,
You can use the command InputStream.getChannel().size()
For a complete example please look at the following url:
http://www.java2s.com/Code/JavaAPI/java.io/FileInputStreamgetChannel.htm
Best Regards,
Darksu
Hi Darksu
But i use the media to get file in the viewmodel. I get the InputStream by media.getStreamData(). It will be error on xml file. The png file is ok.
Asked: 2014-10-15 07:13:47 +0800
Seen: 5 times
Last updated: Oct 27 '14