-2

Did i right understand, what Channel used for cases, when data, which we want to write - is not full received/prepared data?

But OutputStream used for case when we can write all data already now.

Another words:
nio - when we asynchronous getting data for writing
io - when we synchronous got data for writing

GreenFed
  • 57
  • 2
  • 7

1 Answers1

1
  1. There is no such a type as java.io.Stream;

  2. If you, by any means, meant java.util.Stream and java.nio.channels.Channels, then they are two completely different types serving different purposes;

  3. Finally, if you are comparing java.io and java.nio, then io is about reading and writing, whereas nio is about faster I/O, a.k.a buffered-reading and buffered-writing operations.

Giorgi Tsiklauri
  • 9,715
  • 8
  • 45
  • 66