IP Camera Viewer - IOException: Premature EOF

see here: IP camera status - how to catch "Stream ended." status