Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for void (0.18 sec)

  1. src/test/java/org/codelibs/curl/io/IOIntegrationTest.java

            MockHttpURLConnection(URL u) {
                super(u);
            }
    
            @Override
            public void disconnect() {
                // Do Nothing
            }
    
            @Override
            public boolean usingProxy() {
                return false;
            }
    
            @Override
            public void connect() throws IOException {
                // Do Nothing
            }
    
            @Override
    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)
  2. src/main/java/org/codelibs/curl/io/ContentCache.java

            this.data = data;
            this.file = null;
        }
    
        public ContentCache(final File file) {
            this.data = null;
            this.file = file;
        }
    
        @Override
        public void close() throws IOException {
            if (file != null) {
                Files.delete(file.toPath());
            }
        }
    
        public InputStream getInputStream() throws IOException {
            if (file != null) {
    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)
  3. src/test/java/org/codelibs/curl/io/ContentOutputStreamTest.java

    public class ContentOutputStreamTest {
    
        @Test
        public void inMemory() throws IOException {
            ContentOutputStream cos = new ContentOutputStream(10, Curl.tmpDir);
            cos.write(new byte[] { 0, 1, 2, 3, 4 });
            assertFalse(cos.done);
            assertTrue(cos.isInMemory());
            cos.close();
            assertFalse(cos.done);
        }
    
        @Test
        public void inFile() throws IOException {
    Java
    - Registered: Thu May 09 15:34:10 GMT 2024
    - Last Modified: Mon Nov 14 21:05:19 GMT 2022
    - 2K bytes
    - Viewed (0)
  4. src/test/java/org/codelibs/curl/CurlTest.java

    import java.util.logging.Logger;
    
    import org.junit.Test;
    
    public class CurlTest {
        private static final Logger logger = Logger.getLogger(CurlTest.class.getName());
    
        @Test
        public void test_Get() {
            Curl.get("https://www.codelibs.org/").execute(response -> {
                final String content = response.getContentAsString();
                logger.info(content);
                assertTrue(content.length() > 0);
    Java
    - Registered: Thu May 09 15:34:10 GMT 2024
    - Last Modified: Mon Nov 14 21:05:19 GMT 2022
    - 2.5K bytes
    - Viewed (1)
  5. src/main/java/org/codelibs/curl/CurlResponse.java

            return encoding;
        }
    
        public void setEncoding(final String encoding) {
            this.encoding = encoding;
        }
    
        public void setContentException(final Exception e) {
            contentException = e;
        }
    
        public Exception getContentException() {
            return contentException;
        }
    
        public void setHeaders(final Map<String, List<String>> headers) {
            if (headers != null) {
    Java
    - Registered: Thu May 09 15:34:10 GMT 2024
    - Last Modified: Mon Nov 14 21:05:19 GMT 2022
    - 4K bytes
    - Viewed (0)
  6. src/main/java/org/codelibs/curl/io/ContentOutputStream.java

            super(threshold, PREFIX, SUFFIX, tmpDir);
        }
    
        @Override
        public File getFile() {
            done = true;
            return super.getFile();
        }
    
        @Override
        public void close() throws IOException {
            try {
                super.close();
            } finally {
                if (!isInMemory() && !done) {
                    final File file = super.getFile();
                    if (file != null) {
    Java
    - Registered: Thu May 09 15:34:10 GMT 2024
    - Last Modified: Mon Nov 14 21:05:19 GMT 2022
    - 1.9K bytes
    - Viewed (0)
  7. src/main/java/org/codelibs/curl/CurlRequest.java

            if (headerList == null) {
                headerList = new ArrayList<>();
            }
            headerList.add(new String[] { key, value });
            return this;
        }
    
        public void connect(final Consumer<HttpURLConnection> actionListener, final Consumer<Exception> exceptionListener) {
            final Runnable task = () -> {
                if (paramList != null) {
                    char sp;
    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