search

Home  >  Q&A  >  body text

java - 使用了NIO还能重新使用IO吗?

比如服务器的底层的socket的channel的read和write 已经注册到了selector中, 那么上层的servlet还能调用getOutputStream返回servletOutputStream吗? 如果能该怎么写代码呢?

大家讲道理大家讲道理2768 days ago373

reply all(2)I'll reply

  • 天蓬老师

    天蓬老师2017-04-18 10:11:50

    Why do the title and problem description seem to be written differently? Were they written by two people?

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-18 10:11:50

    Yes, the technology used by the server is transparent to you when developing Servlets. You don’t need to worry about whether the server is NIO or BIO, Servlets are written the same.

    reply
    0
  • Cancelreply