Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道 Netty 上的 FileInputStream 是什么,因为我需要在文件上使用它!在这方面需要帮助!谢谢,米格
如果要传输文件,请使用 DefaultFileRegion。
Channel channel =... channel.write(new DefaultFileRegion(new FileInputStream(file).getChannel(), 0L, file.length());
- 当FileInputStream您想要读取字节File形式或读取字节数组等时使用......
FileInputStream
File