Menu Bar

Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Monday, 8 May 2017

What is BufferedInputStream Class In Java ?

Class BufferedInputStream

All Implemented Interfaces:
Closeable, AutoCloseable

Declaration of BufferedInputStream:
public class BufferedInputStream
extends FilterInputStream

When BufferedInputStream is created an internal buffer is created. And this buffer supports mark and reset methods. When the bytes from steam are read or skipped ,the internal buffer automatically refilled as necessary from the contained input stream.

The Mark operation put a point in a Input Stream and reset operation reads the bytes from the most recent mark operation, before new bytes are taken from the input stream.

Constructor Summary of BufferedInputStream:

Constructor
Description
BufferedInputStream(InputStream in)
Creates a BufferedInputStream and saves its argument, the input stream in, for later use.
BufferedInputStream(InputStream in, int size)
Creates a BufferedInputStream with the specified buffer size, and saves its argument, the input stream in, for later use.

Method Summary of BufferedInputStream:

Modifier and Method Name
Description
int available()
Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking by the next invocation of a method for this input stream.
void close()
Closes this input stream and releases any system resources associated with the stream.
void mark(int readlimit)
See the general contract of the mark method of InputStream.
boolean markSupported()
Tests if this input stream supports the mark and reset methods.
int read()
See the general contract of the read method of InputStream.
int read(byte[] b, int off, int len)
Reads bytes from this byte-input stream into the specified byte array, starting at the given offset.
void reset()
See the general contract of the reset method of InputStream.
long skip(long n)
See the general contract of the skip method of InputStream.


      
Blog Author - Pushkar Khosla,
Software Developer by Profession with 3.0 Yrs of Experience , through this blog i'am sharing my industrial Java Knowledge to entire world. For any question or query any one can comment below or mail me at pushkar.itsitm52@gmail.com.

Share this Blog with yours Friends !!

No comments:

Post a Comment