Package com.esri.gpt.framework.http

Examples of com.esri.gpt.framework.http.ResponseInfo


        new ContentHandler() {
       
          @Override
          public boolean onBeforeReadResponse(HttpClientRequest request) {
            AgpDPart oThis = AgpDPart.this;
            ResponseInfo info = request.getResponseInfo();
            Header h;
            String s;
            s = "responseContentLength "+info.getContentLength();
            AgpDPart.LOGGER.finest("onBeforeReadResponse "+s);
           
            h = info.getResponseHeader("Content-Type");
            if (h != null) {
              HeaderElement elements[] = h.getElements();
              // Expect only one header element to be there, no more, no less
              if (elements.length == 1) {
                String sContentType = elements[0].getName();
                String sCharset = null;
                NameValuePair nvp = elements[0].getParameterByName("charset");
                if (nvp != null) {
                  sCharset = nvp.getValue();
                }
                oThis.setContentType(sContentType);
                oThis.setCharset(sCharset);
                s = "contentType="+sContentType+" charset="+sCharset;
                AgpDPart.LOGGER.finest("onBeforeReadResponse "+s);
              }
            }
           
            h = info.getResponseHeader("Content-Disposition");
            if (h != null) {
              HeaderElement elements[] = h.getElements();
              for (HeaderElement element: elements) {
                NameValuePair[] params = element.getParameters();
                for (NameValuePair param: params) {
View Full Code Here

TOP

Related Classes of com.esri.gpt.framework.http.ResponseInfo

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.