Java ByteArrayOutputStream size() methodThe size() method of Java ByteArrayOutput class returns the current size of buffer. Syntax:ReturnsThe size() method returns the value of the count field which is the number of valid bytes in this output stream. Example 1Test it NowOutput: 1:V 2:VW 3:VWX 4:VWXY 5:VWXYZ Example 2Test it NowOutput: 1:G 2:GH 3:GHI 4:GHIJ
Next TopicJava ByteArrayOutputStream Class
|