Don't ignore the result of Statement.executeQuery().

Coverity thinks it's bad form.
Mark a nested class as static.

Coverity thinks that's cleaner. Also fix a comment typo while we're at it.
Make sure file is closed on exception.

The system will eventually close the file anyway, and this read is highly
unlikely to throw an IOException in practice.

Also, use RandomAccessFile.readFully(byte[]) to slurp the file into byte
array, rather than FileInputStream.read(byte[]). The latter would need to
be called in a loop to protect from short reads.

Both issues were complained of by Coverity.
Fix a couple of trivial Statement leaks.

Found by Coverity.
Plug some Statement leaks in metadata queries.

These are fairly harmless, nobody calls these metadata methods frequently
enough for the leaks to matter, and a regular Statement doesn't hold onto
any server resources anyway. But let's appease Coverity.
Avoid integer overflow.

The function returns long, but does the calculation first in int. If someone
sets the timeout to 600 hours in the URL, it will overflow, even though the
return value of the function is long and hence could return a larger value.

To silence a Coverity complaint.
Use StringBuffer to construct a string.

This piece of code isn't performance-critical at all, but silences a
Coverity complaint.
Merge pull request #102 from hlinnaka/coverity-fixes

Coverity fixes