Java ByteArrayOutputStream write() methodThe write() method of Java ByteArrayOutputStream class is used to write len bytes from the specified byte array standing at offset off to this byte array output stream. Syntax:Overrideswrite() method in class OutputStream. Parameters:b- the data. off- the start offset in the data. len- the number of byte to write. ReturnsNA Example 1Test it NowOutput: Java Example 2Test it NowOutput: ![]() Java ByteArrayOutputStream write() methodThe write() method is used to write the specified bytes to this output stream. Syntax:Parameters:b-the byte to be written Specified By:write() in class OutputStream. Example 1Test it NowOutput: ABC Example 2Test it NowOutput: WXYZ
Next TopicJava ByteArrayOutputStream Class
|