- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for ChannelUtil (3.63 sec)
-
src/main/java/org/codelibs/core/nio/ChannelUtil.java
import org.codelibs.core.exception.IORuntimeException; /** * Utility for {@link Channel}. * * Author: koichik */ public abstract class ChannelUtil { /** * Do not instantiate. */ protected ChannelUtil() { } /** * Returns a {@link ByteBuffer} that maps the file channel to memory. * * @param channelRegistered: Sat Dec 20 08:55:33 UTC 2025 - Last Modified: Thu Jul 31 08:16:49 UTC 2025 - 5.6K bytes - Viewed (0) -
src/main/java/org/codelibs/core/io/FileUtil.java
final long fileSize = ChannelUtil.size(channel); if (fileSize > maxSize) { throw new IORuntimeException(new IOException("File too large: " + fileSize + " bytes (max: " + maxSize + " bytes). Use streaming APIs for large files.")); } final ByteBuffer buffer = ByteBuffer.allocate((int) fileSize); ChannelUtil.read(channel, buffer);
Registered: Sat Dec 20 08:55:33 UTC 2025 - Last Modified: Sat Nov 22 11:21:59 UTC 2025 - 13.1K bytes - Viewed (0) -
src/main/java/org/codelibs/core/io/CopyUtil.java
import java.net.URL; import java.nio.ByteBuffer; import java.nio.channels.FileChannel; import org.codelibs.core.exception.IORuntimeException; import org.codelibs.core.net.URLUtil; import org.codelibs.core.nio.ChannelUtil; /** * Utility for copying. * <p> * The combinations of input and output types and the unit of elements copied are as follows: * </p> * <table border="1">
Registered: Sat Dec 20 08:55:33 UTC 2025 - Last Modified: Thu Jul 31 08:16:49 UTC 2025 - 45.2K bytes - Viewed (0)