Home » Tag Archives: ByteArrayInputStream

Tag Archives: ByteArrayInputStream

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 »

java.io.InputStream Example

In this example we are going to talk about a very important Java class, InputStream. If you have even the slightest experience with programming in Java, chances are that you’ve already used InputStream in one of your programs, or one of its subclasses, like FileInputStream or BufferedInputStream. You see, InputStream is an abstract class, that provides all the necessary API ...

Read More »

How to convert String to InputStream in Java

In the previous tutorial, we discussed how can we convert an InputStream into a String. In this tutorial we are going to see the opposite direction. So, we are going to covert a String into an InputStream. When you have a very big String that you want to process it incrementally, or a small portion of it at a time, ...

Read More »