这段代码是什么意思!

zlheadof 2003-10-09 01:23:03
FileChannel outChannel = outputFile.getChannel();

getChannel是什么意思???
...全文
73 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
hj12 2003-10-09
  • 打赏
  • 举报
回复
不懂!过来听课,谁再解释一下!◎
JCC0128 2003-10-09
  • 打赏
  • 举报
回复
一.java 2 sdk help chm格式,可以进行索引查询,强推。
http://javadocs.planetmirror.com/dist/jdk142-hh.zip
JCC0128 2003-10-09
  • 打赏
  • 举报
回复
getChannel
public FileChannel getChannel()
Returns the unique FileChannel object associated with this file output stream.

The initial position of the returned channel will be equal to the number of bytes written to the file so far unless this stream is in append mode, in which case it will be equal to the size of the file. Writing bytes to this stream will increment the channel's position accordingly. Changing the channel's position, either explicitly or by writing, will change this stream's file position.


Returns:
the file channel associated with this file output stream
Since:
1.4
bromon 2003-10-09
  • 打赏
  • 举报
回复
getChannel是jdk 1.4里面新加的NIO里面的东西

用于非阻塞式IO,可以理解成端口复用,在一个端口上打开多个频道

62,612

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧