Javatpoint Logo
Javatpoint Logo

Java ByteArrayOutputStream reset() Method

The reset() method of Java ByteArrayOutputStream class is used to reset the stream and makes the stream count =0 so that all currently accumulated output in the output stream is discarded. The output stream can be used again, reusing the already allocated buffer space.

Syntax:

Parameters:

NA

Returns

NA

Example 1

Test it Now

Output:

Before Resetting :A
After Resetting :U

Example 2

Test it Now

Output:

Before Resetting :K
After Resetting :Z






Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA