- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for InputStreamUtil (0.06 sec)
-
src/main/java/org/codelibs/core/io/InputStreamUtil.java
import org.codelibs.core.exception.IORuntimeException; /** * Utility class for {@link InputStream}. * * @author higa */ public abstract class InputStreamUtil { /** * Do not instantiate. */ protected InputStreamUtil() { } /** Default buffer size. */ private static final int BUF_SIZE = 4096; /** * Creates a {@link FileInputStream}. *
Registered: Fri Sep 05 20:58:11 UTC 2025 - Last Modified: Thu Jul 31 08:16:49 UTC 2025 - 3K bytes - Viewed (0) -
src/test/java/org/codelibs/core/io/InputStreamUtilTest.java
public void testGetBytes() throws Exception { final InputStream is = ResourceUtil.getResourceAsStream(StringUtil.replace(getClass().getName(), ".", "/") + ".class"); try { assertNotNull("1", InputStreamUtil.getBytes(is)); } finally { is.close(); } }
Registered: Fri Sep 05 20:58:11 UTC 2025 - Last Modified: Sat May 10 01:32:17 UTC 2025 - 1.2K bytes - Viewed (0) -
src/main/java/org/codelibs/core/io/FileUtil.java
* @return A byte array containing the contents of the file. */ public static byte[] readBytes(final File file) { assertArgumentNotNull("file", file); final FileInputStream is = InputStreamUtil.create(file); try { final FileChannel channel = is.getChannel(); final ByteBuffer buffer = ByteBuffer.allocate((int) ChannelUtil.size(channel));
Registered: Fri Sep 05 20:58:11 UTC 2025 - Last Modified: Thu Jul 31 08:16:49 UTC 2025 - 8.8K bytes - Viewed (0) -
src/main/java/org/codelibs/core/io/ResourceTraversalUtil.java
final String filePath = FileUtil.getCanonicalPath(file); final String resourcePath = filePath.substring(pos + 1).replace('\\', '/'); final InputStream is = InputStreamUtil.create(file); try { handler.processResource(resourcePath, is); } finally { CloseableUtil.close(is); } }
Registered: Fri Sep 05 20:58:11 UTC 2025 - Last Modified: Thu Jul 31 08:16:49 UTC 2025 - 9.2K bytes - Viewed (0)