mysterin / question_and_answer

1 stars 0 forks source link

通道 Channel 和流 Stream 操作区别 #168

Closed mysterin closed 5 years ago

mysterin commented 5 years ago
  1. 通道可以读和写, 而流操作只有单向的, 要么读要么写(InputStream 和 OutputStream);
  2. 通道是可以非阻塞的, 而流操作是阻塞的.