- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for ContentOutputStream (0.1 sec)
-
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) {
Registered: Thu Oct 31 02:32:13 UTC 2024 - Last Modified: Mon Nov 14 21:05:19 UTC 2022 - 1.9K bytes - Viewed (0) -
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 Oct 31 02:32:13 UTC 2024 - Last Modified: Mon Nov 14 21:05:19 UTC 2022 - 2K bytes - Viewed (0) -
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 Oct 31 02:32:13 UTC 2024 - Last Modified: Mon Nov 14 21:05:19 UTC 2022 - 3.4K bytes - Viewed (0) -
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 Oct 31 02:32:13 UTC 2024 - Last Modified: Sun Feb 12 12:21:25 UTC 2023 - 12.3K bytes - Viewed (0)