Examples of Get()


Examples of HTTPClient.HTTPConnection.Get()

    String data = "";

    try {
      HTTPConnection con = new HTTPConnection(host);
      HTTPResponse rsp = con.Get(path);
      // Call getText to block the connection until it gets the whole page.
      rsp.getText();
      byte[] bytes = rsp.getData();

      // Create decoder for ISO-8859-2
View Full Code Here

Examples of kdu_jni.Kdu_params.Get()

            r.setCompositingLayerCount(frames[0]);

            int[] v = new int[1];
            Kdu_params p = codestream.Access_siz().Access_cluster("COD");
            if (p != null) {
                p.Get(Kdu_global.Clayers, 0, 0, v, true, true, true);
          if (v[0] > 0)
                    r.setQualityLayers(v[0]);
            }

      if (codestream.Exists())
View Full Code Here

Examples of net.yacy.cora.protocol.http.HTTPClient.GET()

           
            final HTTPClient client = setupHttpClient(requestHeader, connectHost);
           
            // send request
            try {
              client.GET(getUrl);
                if (log.isFinest()) log.logFinest(reqID +"    response status: "+ client.getHttpResponse().getStatusLine());
                conProp.put(HeaderFramework.CONNECTION_PROP_CLIENT_REQUEST_HEADER, requestHeader);

                final ResponseHeader responseHeader = new ResponseHeader(client.getHttpResponse().getAllHeaders());
                // determine if it's an internal error of the httpc
View Full Code Here

Examples of net.yacy.cora.protocol.http.HTTPClient.GET()

                    Log.logWarning("yacyVersion", "download of signature " + getUrl().toString() + " failed. ignoring signature file.");
                }
                else signatureBytes = Base64Order.standardCoder.decode(UTF8.String(signatureData).trim());
            }
            client.setTimout(120000);
            client.GET(getUrl().toString());
            final ResponseHeader header = new ResponseHeader(client.getHttpResponse().getAllHeaders());

            final boolean unzipped = header.gzip() && (header.mime().toLowerCase().equals("application/x-tar")); // if true, then the httpc has unzipped the file
            if ((unzipped) && (name.endsWith(".tar.gz"))) {
                download = new File(storagePath, name.substring(0, name.length() - 3));
View Full Code Here

Examples of net.yacy.cora.protocol.http.HTTPClient.GET()

        requestHeader.put(HeaderFramework.USER_AGENT, ClientIdentification.getUserAgent());
        final HTTPClient client = new HTTPClient();
        client.setTimout(5000);
        client.setHeader(requestHeader.entrySet());
        try {
            client.GET(sitemapURL.toString());
            if (client.getStatusCode() != 200) {
                throw new IOException("Unable to download the sitemap file " + sitemapURL +
                        "\nServer returned status: " + client.getHttpResponse().getStatusLine());
            }
   
View Full Code Here

Examples of net.yacy.cora.protocol.http.HTTPClient.GET()

            final HTTPClient client = setupHttpClient(requestHeader, connectHost);

            // send request
            try {
              client.GET(getUrl);
                if (log.isFinest()) log.logFinest(reqID +"    response status: "+ client.getHttpResponse().getStatusLine());
                conProp.put(HeaderFramework.CONNECTION_PROP_CLIENT_REQUEST_HEADER, requestHeader);

                final ResponseHeader responseHeader = new ResponseHeader(client.getHttpResponse().getAllHeaders());
                // determine if it's an internal error of the httpc
View Full Code Here

Examples of net.yacy.cora.protocol.http.HTTPClient.GET()

        requestHeader.put(HeaderFramework.USER_AGENT, ClientIdentification.getUserAgent());
        final HTTPClient client = new HTTPClient();
        client.setTimout(5000);
        client.setHeader(requestHeader.entrySet());
        try {
            client.GET(sitemapURL.toString());
            if (client.getStatusCode() != 200) {
                throw new IOException("Unable to download the sitemap file " + sitemapURL +
                        "\nServer returned status: " + client.getHttpResponse().getStatusLine());
            }
   
View Full Code Here

Examples of org.eclipse.jetty.client.HttpClient.GET()

            HttpClient client = new HttpClient();
            client.start();
            String url = "http://localhost:" + port1 + contextPath + servletMapping;

            //make a request to set up a session on the server
            ContentResponse response = client.GET(url + "?action=init");
            assertEquals(HttpServletResponse.SC_OK,response.getStatus());
            String sessionCookie = response.getHeaders().get("Set-Cookie");
            assertTrue(sessionCookie != null);
            // Mangle the cookie, replacing Path with $Path, etc.
            sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path=");
View Full Code Here

Examples of org.eclipse.jetty.client.HttpClient.GET()

                HttpClient client = new HttpClient();
                client.start();
                try
                {
                    // Connect to server1 to create a session and get its session cookie
                    ContentResponse response1 = client.GET("http://localhost:" + port1 + contextPath + servletMapping + "?action=init");
                    assertEquals(HttpServletResponse.SC_OK,response1.getStatus());
                    String sessionCookie = response1.getHeaders().get("Set-Cookie");
                    assertTrue(sessionCookie != null);
                    // Mangle the cookie, replacing Path with $Path, etc.
                    sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path=");
View Full Code Here

Examples of org.eclipse.jetty.client.HttpClient.GET()

                    String[] urls = new String[2];
                    urls[0] = "http://localhost:" + port1 + contextPath + servletMapping;
                    urls[1] = "http://localhost:" + port2 + contextPath + servletMapping;

                    // Create the session on node1
                    ContentResponse response1 = client.GET(urls[0] + "?action=init");
                    assertEquals(HttpServletResponse.SC_OK,response1.getStatus());
                    String sessionCookie = response1.getHeaders().get("Set-Cookie");
                    assertTrue(sessionCookie != null);
                    // Mangle the cookie, replacing Path with $Path, etc.
                    sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path=");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.