Nguyễn Vân Anh
New member
How do I check if InputStream is empty?
Answer
No, you can’t. InputStream is designed to work with remote resources, so you can’t know if it’s there until you actually read from it. You may be able to use a
java.
…
Answer
No, you can’t. InputStream is designed to work with remote resources, so you can’t know if it’s there until you actually read from it. You may be able to use a
java.
…
- available() tells you if there’s data ready to be read, it doesn’t necessarily tell you if the stream is empty. …
- @skaffman: thanks a lot!