public class EOFException extends IOException:
Signals that an end of file or end of stream has been reached unexpectedly during input.
http://docs.oracle.com/javase/7/docs/api/java/io/EOFException.html
You are calling conn.getOutputStream();
and then calling conn.getInputStream();
without resetting. You are already at the end of the file.