Package com.cloudesire.tisana4j.exceptions

Examples of com.cloudesire.tisana4j.exceptions.BadRequestException


    EntityUtils.consumeQuietly(response.getEntity());
    String allow = null;
    Header[] allHeaders = response.getAllHeaders();
    for (int i = 0; i < allHeaders.length; i++)
      if (allHeaders[i].getName() == "Allow") allow = allHeaders[i].getValue();
    if (allow == null) throw new BadRequestException(404,"Method options not supported.");
    return allow.split(",");
  }
View Full Code Here


    String msgError = responseMessage != null ? responseMessage : reasonPhrase;

    switch (responseCode)
    {
    case 400:
      return new BadRequestException(responseCode, msgError);
    case 403:
      return new AccessDeniedException(responseCode, msgError);
    case 404:
      return new ResourceNotFoundException(responseCode, msgError);
    case 422:
View Full Code Here

TOP

Related Classes of com.cloudesire.tisana4j.exceptions.BadRequestException

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.