Hi guys, I need to get the size of an InputStream without converting it into a File. Is there any way to do this using the Java NIO package?
Thanks in advance!
It's not possible to get the size of any arbitrary InputStream, because often not all data is available yet. For instance, if you read data from a Socket, some data may not even have been sent yet.