Resolve Maven warnings.  Update dependencies.

Bouncy Castle added to formalise SSL implementation.
Remove compiler warning.

Delete if (false) condition and simply leave code commented out.
Remove unused import.
Prevent resource leakage.

Add finally blocks to close streams.
Remove resource leaks

Add finally block to close streams.
Improve exception behaviour.

Remove write to stderr and throw a meaningful exception.
Prevent resource leakage.

Ensure streams are closed when no longer required.
Update to use BouncyCastle for Certificates
Prevent compiler warning.

Suppress warning, add a comment to explain.
Update to use BouncyCastle for SSL

Code taken from WebScarab.
Prevent resource leakage.

Close streams when no longer required.
Prevent resource leakage.

Close streams when no longer required.
Prevent resource leakage.

Close streams when no longer required.
Prevent resource leakage.

Close streams when no longer required.
Prevent resource leakage.

Close streams when no longer required.