Java ByteArrayOutputStream close() methodThe close() method of Java ByteArrayOutputStream class closes this output stream and releases any system resource linked with this stream. The stream which has been closed cannot perform output operations and cannot be reopened. Syntax:Specified By:close() method in interface Autocloseable. close() method in interface Closeable. Throws:IOException - if an I/O error occurs Example 1Test it NowOutput: AB@C Example 2Test it NowOutput: KLMN
Next TopicJava ByteArrayOutputStream Class
|