- Sort Score
- Num 10 results
- Language All
Results 1 - 3 of 3 for getContentAsBytes (0.05 seconds)
-
src/test/java/org/codelibs/curl/io/ContentCacheTest.java
ContentCache cache = new ContentCache(data); // ## Act & Assert ## assertArrayEquals(cache.getContentAsBytes(), cache.getContentAsBytes()); assertArrayEquals(cache.getContentAsBytes(), cache.getContentAsBytes()); } @Test public void testIsInMemory_WithEmptyByteArray() { // ## Arrange ##
Created: Thu Apr 02 15:34:12 GMT 2026 - Last Modified: Sat Mar 21 09:11:12 GMT 2026 - 15.9K bytes - Click Count (0) -
src/main/java/org/codelibs/curl/io/ContentCache.java
* * @return the content as a byte array * @throws IOException if an I/O error occurs while reading the file */ public byte[] getContentAsBytes() throws IOException { if (data != null) { return data.clone(); } return Files.readAllBytes(file.toPath()); } @OverrideCreated: Thu Apr 02 15:34:12 GMT 2026 - Last Modified: Sat Mar 21 09:11:12 GMT 2026 - 4.8K bytes - Click Count (0) -
src/main/java/org/codelibs/curl/CurlResponse.java
} throw new CurlException("Failed to access the content."); } try { return new String(contentCache.getContentAsBytes(), encoding); } catch (final Exception e) { throw new CurlException("Failed to access the content.", e); } } /**Created: Thu Apr 02 15:34:12 GMT 2026 - Last Modified: Sat Mar 21 09:11:12 GMT 2026 - 6.8K bytes - Click Count (0)