public void close() throws IOException {
        if (inStream != null) {
            inStream.close();
        }
        if (errStream != null) {
            errStream.close();
        }
        if (conn != null) {
            conn.disconnect();
        }
    }