Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for ContentOutputStream (0.21 sec)

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

    public class ContentOutputStream extends DeferredFileOutputStream {
    
        protected static final Logger logger = Logger.getLogger(ContentOutputStream.class.getName());
    
        protected static final String PREFIX = "curl4j-";
    
        protected static final String SUFFIX = ".tmp";
    
        protected boolean done = false;
    
        public ContentOutputStream(final int threshold, final File tmpDir) {
    Java
    - Registered: Thu May 02 15:34:13 GMT 2024
    - Last Modified: Mon Nov 14 21:05:19 GMT 2022
    - 1.9K 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);
    Java
    - Registered: Thu May 02 15:34:13 GMT 2024
    - Last Modified: Mon Nov 14 21:05:19 GMT 2022
    - 2K bytes
    - Viewed (0)
  3. 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) {
    Java
    - Registered: Thu May 02 15:34:13 GMT 2024
    - Last Modified: Sun Feb 12 12:21:25 GMT 2023
    - 12.3K 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());
    Java
    - Registered: Thu May 02 15:34:13 GMT 2024
    - Last Modified: Mon Nov 14 21:05:19 GMT 2022
    - 3.4K bytes
    - Viewed (0)
Back to top