Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for isInMemory (0.28 sec)

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

            assertFalse(cos.done);
            assertTrue(cos.isInMemory());
            cos.close();
            assertFalse(cos.done);
        }
    
        @Test
        public void inFile() throws IOException {
            ContentOutputStream cos = new ContentOutputStream(10, Curl.tmpDir);
            cos.write(new byte[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 });
            assertFalse(cos.done);
            assertFalse(cos.isInMemory());
            File file = cos.getFile();
    Java
    - Registered: Thu Apr 25 15:34:08 GMT 2024
    - Last Modified: Mon Nov 14 21:05:19 GMT 2022
    - 2K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/curl/CurlRequest.java

                    }
                    dfos.flush();
                    final ContentCache contentCache;
                    logger.fine(() -> "Response in " + (dfos.isInMemory() ? "Memory" : "File"));
                    if (dfos.isInMemory()) {
                        contentCache = new ContentCache(dfos.getData());
                    } else {
                        contentCache = new ContentCache(dfos.getFile());
                    }
    Java
    - Registered: Thu Apr 25 15:34:08 GMT 2024
    - Last Modified: Sun Feb 12 12:21:25 GMT 2023
    - 12.3K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/curl/io/ContentOutputStream.java

            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) {
                        try {
                            Files.deleteIfExists(file.toPath());
    Java
    - Registered: Thu Apr 25 15:34:08 GMT 2024
    - Last Modified: Mon Nov 14 21:05:19 GMT 2022
    - 1.9K bytes
    - Viewed (0)
Back to top