Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for ChannelUtil (0.79 sec)

  1. 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 channel
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jul 31 08:16:49 UTC 2025
    - 5.6K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/core/io/FileUtil.java

            final FileInputStream is = InputStreamUtil.create(file);
            try {
                final FileChannel channel = is.getChannel();
                final ByteBuffer buffer = ByteBuffer.allocate((int) ChannelUtil.size(channel));
                ChannelUtil.read(channel, buffer);
                return buffer.array();
            } finally {
                CloseableUtil.close(is);
            }
        }
    
        /**
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jul 31 08:16:49 UTC 2025
    - 8.8K bytes
    - Viewed (0)
  3. 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: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jul 31 08:16:49 UTC 2025
    - 45.2K bytes
    - Viewed (0)
Back to top