O'Reilly logo

Distributed Computing in Java 9 by Raja Malleswara Rao Pattamsetti

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Streams

As we have seen, once a connection is established with the remote machine, data gets exchanged in the form of binary streams. To access binary data, the java.io package provides two basic types of classes: one for incoming and other for outgoing data, namely java.io.InputStream and java.io.OutputStream, respectively. Both InputStream and OutputStream support communication through bytes and expose the methods to read or write the information in the form of bytes or byte array. They have many subclasses meant for writing to different destinations and reading from different sources (for example, string buffers and files). But, if we want to send character data (16-bit), then one has to go for the java.io.Reader and java.io.Writer classes. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required