Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for ContentOutputStream (0.07 sec)

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

     *   <li>{@code done} - Flag indicating whether the file has been retrieved.</li>
     * </ul>
     *
     * <p>Constructors:</p>
     * <ul>
     *   <li>{@code ContentOutputStream(int threshold, File tmpDir)} - Constructs a ContentOutputStream with a specified threshold and temporary directory.</li>
     * </ul>
     *
     * <p>Methods:</p>
     * <ul>
     *   <li>{@code getFile()} - Marks the file as retrieved and returns the file.</li>
    Registered: Thu Sep 04 15:34:10 UTC 2025
    - Last Modified: Sat Jul 05 01:38:18 UTC 2025
    - 3.4K bytes
    - Viewed (0)
  2. src/test/java/org/codelibs/curl/io/ContentOutputStreamTest.java

            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 {
            ContentOutputStream cos = new ContentOutputStream(10, Curl.tmpDir);
    Registered: Thu Sep 04 15:34:10 UTC 2025
    - Last Modified: Sat May 10 01:44:04 UTC 2025
    - 2K bytes
    - Viewed (0)
  3. README.md

    - `org.codelibs.curl.CurlResponse`: wrapper for HTTP responses.
    - `org.codelibs.curl.CurlException`: unchecked exception for errors.
    - `org.codelibs.curl.io.ContentCache` and `ContentOutputStream`: internal utilities for streaming and caching.
    
    Refer to the Javadoc for full API details.
    
    ## Building and Testing
    
    ```bash
    git clone https://github.com/codelibs/curl4j.git
    cd curl4j
    mvn clean test
    Registered: Thu Sep 04 15:34:10 UTC 2025
    - Last Modified: Sat Jul 05 01:11:14 UTC 2025
    - 2.5K bytes
    - Viewed (0)
  4. src/test/java/org/codelibs/curl/io/IOIntegrationTest.java

    import java.net.URL;
    import java.util.Arrays;
    import java.util.Objects;
    import java.util.function.Consumer;
    import java.util.logging.Logger;
    
    import static org.codelibs.curl.io.ContentOutputStream.PREFIX;
    import static org.codelibs.curl.io.ContentOutputStream.SUFFIX;
    import static org.junit.Assert.assertEquals;
    
    public class IOIntegrationTest {
    
        private static final Logger logger = Logger.getLogger(IOIntegrationTest.class.getName());
    Registered: Thu Sep 04 15:34:10 UTC 2025
    - Last Modified: Sat May 10 01:44:04 UTC 2025
    - 3.4K bytes
    - Viewed (0)
  5. src/main/java/org/codelibs/curl/CurlRequest.java

             */
            private void writeContent(final Supplier<InputStream> handler) {
                try (BufferedInputStream bis = new BufferedInputStream(handler.get());
                        ContentOutputStream dfos = new ContentOutputStream(threshold, Curl.tmpDir)) {
                    final byte[] bytes = new byte[4096];
                    int length = bis.read(bytes);
                    while (length != -1) {
                        if (length != 0) {
    Registered: Thu Sep 04 15:34:10 UTC 2025
    - Last Modified: Sat Jul 05 01:38:18 UTC 2025
    - 17.8K bytes
    - Viewed (0)
Back to top