Package com.jdroid.java.exception

Examples of com.jdroid.java.exception.ConnectionException


      source.setEncoding(EncodingUtils.UTF8);
      reader.parse(source);
     
      return getResponse();
    } catch (IOException e) {
      throw new ConnectionException(e);
    } catch (SAXException e) {
      throw new UnexpectedException(e);
    } finally {
      LOGGER.debug("Parsing finished.");
    }
View Full Code Here


      // parse and return response.
      return (T)((parser != null) && (inputStream != null) ? parser.parse(inputStream) : null);
    } catch (ClientProtocolException e) {
      Throwable cause = e.getCause();
      if ((cause != null) && (cause instanceof CircularRedirectException)) {
        throw new ConnectionException(e, false);
      } else {
        throw new UnexpectedException(e);
      }
    } catch (ConnectTimeoutException e) {
      throw new ConnectionException(e, true);
    } catch (IOException e) {
      throw new ConnectionException(e, false);
    } finally {
      FileUtils.safeClose(inputStream);
      if (client != null) {
        client.getConnectionManager().shutdown();
      }
View Full Code Here

TOP

Related Classes of com.jdroid.java.exception.ConnectionException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.