Package fr.eolya.utils.http

Examples of fr.eolya.utils.http.HttpStream


    return null;
  }

  private HttpStream initHttpStream() {
    if (ws==null) {
      if (httpLoader!=null) ws = new HttpStream(httpLoader.getStream(), "", getContentType(), httpLoader.getContentEncoding());
      if (cache!=null && cacheItem!=null) ws = new HttpStream(cacheItem.streamData, "", getContentType(), "");
    }
    return ws;
  }
View Full Code Here


           
            if (urlLoader.open(page) == HttpLoader.LOAD_SUCCESS) {
                String contentType = urlLoader.getContentType();
                String contentEncoding = urlLoader.getContentEncoding();
                if ((contentType!=null) && (contentType.toLowerCase().startsWith("text/html"))) {
          HttpStream ws = new HttpStream(urlLoader.getStream(), "", contentType, contentEncoding);
                    String rawPage = ws.getString();
                    ws.clear();
                    try {
                        String ret = "<?xml version=\"1.0\" encoding=\"utf-8\"?><result>";
                        ret += "<page><![CDATA[" + rawPage + "]]>" + "</page></result>";
                        urlLoader.close();
                        return ret;
View Full Code Here

TOP

Related Classes of fr.eolya.utils.http.HttpStream

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.