Small improvements suggested by FindBugs:

- close the input stream
- make inner class static so it doesn't serialize the outer with it
- make a constant really constant