@Override
    public boolean checkConnection() {
        if (this.connection == null) {
            try {
                open();
                return true;
            } catch (MalformedURLException ex) {
                this.writeError("MalformedURLException: " + ex.getMessage(), true);
            } catch (InstantiationException ex) {
                this.writeError("InstantiationExceptioon: " + ex.getMessage(), true);
            } catch (IllegalAccessException ex) {
                this.writeError("IllegalAccessException: " + ex.getMessage(), true);
            }
            return false;
        }
        return true;
    }