this should solve the problem of exception "java.io.IOException: read
failed: EBADF" when invoke getInputStream
Merge pull request #2 from fxp/master

get exception "java.io.IOException: read failed: EBADF" when getInputStream