Home » byte

Tag Archives: byte

Java ByteArrayOutputStream Example

In this example we will discuss about ByteArrayOutputStream class and its usage. This class implements an output stream in which the data is written into a byte array. The buffer automatically grows as data is written to it. The data can be retrieved using toByteArray() and toString(). ByteArrayOutputStream extends OutputStream, the abstract class which is the superclass of all classes ...

Read More »

Java ByteArrayInputStream Example

In this example we will discuss about ByteArrayInputStream class and its usage. A ByteArrayInputStream contains an internal buffer that contains bytes that may be read from the stream. An internal counter keeps track of the next byte to be supplied by the read method. ByteArrayInputStream extends InputStream, the abstract class which is the superclass of all classes representing an input ...

Read More »