I am facing problem with the use of available method of fileinputstream.Its not returning the correct number of bytes that can be read from the input stream but returning a int less than the actual number of bytes available.
Can anyone help ?
posted 11 years ago
The available method returns the number of bytes that can be read without blocking. So it does not necessarily mean that the end of the stream is encountered.
Only when (available == -1) the end of the stream is reached.