How to deal with checked exceptions that cannot ever be thrown
- by ammoQ
Example:
foobar = new InputStreamReader(p.getInputStream(), "ISO-8859-1");
Since the encoding is hardcoded and correct, the constructor will never throw the UnsupportedEncodingException declared in the specification (unless the java implementation is broken, in which case I'm lost anyway). Anyway, Java forces me to deal with that exception…