BufferedInputStream (Java SE 25 & JDK 25)
- All Implemented Interfaces:
Closeable, AutoCloseable
-
Field Summary
Fields
protected byte[]The internal buffer array where the data is stored.
protected intThe index one greater than the index of the last valid byte in the buffer.
protected intThe maximum read ahead allowed after a call to the
markmethod before subsequent calls to theresetmethod fail.protected intThe value of the
posfield at the time the lastmarkmethod was called.protected intThe current position in the buffer.
-
Constructor Summary
Constructors
Creates a
BufferedInputStreamand saves its argument, the input streamin, for later use.Creates a
BufferedInputStreamwith the specified buffer size, and saves its argument, the input streamin, for later use. -
Method Summary
intReturns 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.
voidclose()Closes this input stream and releases any system resources associated with the stream.
voidmark(int readlimit) See the general contract of the
markmethod ofInputStream.booleanTests if this input stream supports the
markandresetmethods.intread()See the general contract of the
readmethod ofInputStream.intread(byte[] b, int off, int len) Reads bytes from this byte-input stream into the specified byte array, starting at the given offset.
voidreset()See the general contract of the
resetmethod ofInputStream.longskip(long n) See the general contract of the
skipmethod ofInputStream.
-
Field Details
-
buf
-
count
-
pos
-
markpos
-
marklimit
-
-
Constructor Details
-
BufferedInputStream
-
BufferedInputStream
-
-
Method Details
-
read
-
read
-
skip
-
available
-
mark
-
reset
-
markSupported
-
close
-