InputStream.available() == 0 as a way to detect if stream is empty ?.