File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
src/main/java/org/jboss/netty/channel Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 4848 * transfer, sending a file with {@link FileRegion} might fail or yield worse
4949 * performance. For example, sending a large file doesn't work well in Windows.
5050 *
51+ * <h3>Not all transports support it</h3>
52+ *
53+ * Currently, the NIO transport is the only transport that supports {@link FileRegion}.
54+ * Attempting to write a {@link FileRegion} to non-NIO {@link Channel} will trigger
55+ * a {@link ClassCastException} or a similar exception.
56+ *
5157 * @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
5258 * @author <a href="http://gleamynode.net/">Trustin Lee</a>
5359 * @version $Rev: 2080 $, $Date: 2010-01-26 18:04:19 +0900 (Tue, 26 Jan 2010) $
5460 */
5561public interface FileRegion extends ExternalResourceReleasable {
5662
63+ // FIXME Make sure all transports support writing a FileRegion
64+ // Even if zero copy cannot be achieved, all transports should emulate it.
65+
5766 /**
5867 * Returns the offset in the file where the transfer began.
5968 */
You can’t perform that action at this time.
0 commit comments