Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for tempDir (0.19 sec)

  1. src/main/java/org/codelibs/curl/Curl.java

     * governing permissions and limitations under the License.
     */
    package org.codelibs.curl;
    
    import java.io.File;
    
    public class Curl {
    
        public static final File tmpDir = new File(System.getProperty("java.io.tmpdir"));
    
        protected Curl() {
            // nothing
        }
    
        public static CurlRequest get(final String url) {
            return new CurlRequest(Method.GET, url);
        }
    
    Java
    - Registered: Thu May 02 15:34:13 GMT 2024
    - Last Modified: Mon Nov 14 21:05:19 GMT 2022
    - 1.7K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/curl/CurlRequest.java

                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)
  3. src/test/java/org/codelibs/curl/io/IOIntegrationTest.java

            // ## Assert ##
            assertEquals(before, after);
        }
    
        private long countTmpFiles() {
            return Arrays.stream(Objects.requireNonNull(Curl.tmpDir.listFiles())).map(File::getName)
                    .filter(s -> s.startsWith(PREFIX) && s.endsWith(SUFFIX)).count();
        }
    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)
  4. 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)
  5. src/main/java/org/codelibs/curl/io/ContentOutputStream.java

        protected static final String SUFFIX = ".tmp";
    
        protected boolean done = false;
    
        public ContentOutputStream(final int threshold, final File tmpDir) {
            super(threshold, PREFIX, SUFFIX, tmpDir);
        }
    
        @Override
        public File getFile() {
            done = true;
            return super.getFile();
        }
    
        @Override
        public void close() throws IOException {
    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)
Back to top