Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for getInputStream (0.17 sec)

  1. src/main/java/org/codelibs/curl/io/ContentCache.java

            this.file = file;
        }
    
        @Override
        public void close() throws IOException {
            if (file != null) {
                Files.delete(file.toPath());
            }
        }
    
        public InputStream getInputStream() throws IOException {
            if (file != null) {
                return new FileInputStream(file);
            }
            return new ByteArrayInputStream(data);
        }
    Java
    - Registered: Thu May 09 15:34:10 GMT 2024
    - Last Modified: Mon Nov 14 21:05:19 GMT 2022
    - 1.6K bytes
    - Viewed (1)
  2. src/test/java/org/codelibs/curl/io/IOIntegrationTest.java

                // Do Nothing
            }
    
            @Override
            public int getResponseCode() throws IOException {
                return 200;
            }
    
            @Override
            public InputStream getInputStream() throws IOException {
                return new ByteArrayInputStream(new byte[100]); // dummy payload
            }
        }
    
        @Test
        public void test_TmpFileHasBeenDeletedAfterResponseWasClosed() throws Exception {
    Java
    - Registered: Thu May 09 15:34:10 GMT 2024
    - Last Modified: Mon Nov 14 21:05:19 GMT 2022
    - 3.4K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/curl/CurlResponse.java

                } else {
                    throw new CurlException("The content does not exist.");
                }
            }
            return contentCache.getInputStream();
        }
    
        public void setContentCache(final ContentCache contentCache) {
            this.contentCache = contentCache;
        }
    
        public int getHttpStatusCode() {
            return httpStatusCode;
        }
    
    Java
    - Registered: Thu May 09 15:34:10 GMT 2024
    - Last Modified: Mon Nov 14 21:05:19 GMT 2022
    - 4K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/curl/CurlRequest.java

                            if (GZIP.equals(con.getContentEncoding())) {
                                return new GZIPInputStream(con.getInputStream());
                            } else {
                                return con.getInputStream();
                            }
                        } else if ("head".equalsIgnoreCase(con.getRequestMethod())) {
    Java
    - Registered: Thu May 09 15:34:10 GMT 2024
    - Last Modified: Sun Feb 12 12:21:25 GMT 2023
    - 12.3K bytes
    - Viewed (0)
Back to top