Package org.jboss.resteasy.client.core
Class SelfExpandingBufferredInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
java.io.BufferedInputStream
org.jboss.resteasy.client.core.SelfExpandingBufferredInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Direct Known Subclasses:
ApacheHttpClient4Executor.ResponseStream
Extension of
BufferedInputStream
enforcing the contract where reset()
always returns to the beginning of the stream, and the internal buffer
expands automatically to the total length of content read from the underlying
stream.-
Field Summary
FieldsFields inherited from class java.io.FilterInputStream
in
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.BufferedInputStream
available, close, markSupported, reset, skip
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Field Details
-
defaultBufferSize
private static int defaultBufferSize
-
-
Constructor Details
-
SelfExpandingBufferredInputStream
-
SelfExpandingBufferredInputStream
-
-
Method Details
-
mark
public void mark(int readlimit) Not supported. Mark position is always zero.- Overrides:
mark
in classBufferedInputStream
-
read
- Overrides:
read
in classBufferedInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classBufferedInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
expand
Double the current buffer size limit. Reset to zero, then double the buffer size and restore last position in the buffer.- Throws:
IOException
-
getBufSize
public int getBufSize()Return the current maximum size of the internal buffer. This is independent of how much data is actually contained within the buffer. -
getCount
public int getCount() -
getPos
public int getPos() -
getMarkLimit
public int getMarkLimit() -
getMarkPos
public int getMarkPos()
-