java-output-stream

I can't understand why there is an error in the code, the topic is InputStream and OutputStream

Have a nice day! Please tell me what is the error in this code. An error occurs: the output stream was empty when it was no ... { if ((result = (byte) i) % 2 == 0) { outputStream.write(result); } } } }

How InputStream and OutputStream work in Java

In Java, I / O streams InputStream and OutputStream represent the concept of working with the outside world, whether it is a ... ream class, specifically the write() method, to send a stream of bytes to the printer? Or to another file via ftp connection?