I investigate java I/O. Now I am reading about pipes.
I wrote simplest code example:
PipedInputStream pipedInputStream = new PipedInputStream();
PipedOutputStream pipedOutputStream = new PipedOutputStream();
pipedOutputStream.connect(pipedInputStream);
pipedOutputStream.write(new byte[]{1});
System.out.println(pipedInputStream.read());
I have following question. As I understand - it is very strange to pass bytes in real life.
Is it really to extend this example for pass entire String for example?