Package com.mysql.cj.protocol.x
Class ReusableInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
com.mysql.cj.protocol.x.ReusableInputStream
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class ReusableInputStream
extends java.io.FilterInputStream
An
InputStream
wrapper that allows switching to different underlying InputStream
s under the same InputStream
instance.-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protected
ReusableInputStream(java.io.InputStream in)
-
Method Summary
Modifier and Type Method Description java.io.InputStream
setInputStream(java.io.InputStream newIn)
Sets a new underlyingInputStream
in thisReusableInputStream
.Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, read, read, reset, skip
-
Constructor Details
-
ReusableInputStream
protected ReusableInputStream(java.io.InputStream in)
-
-
Method Details
-
setInputStream
public java.io.InputStream setInputStream(java.io.InputStream newIn)Sets a new underlyingInputStream
in thisReusableInputStream
.- Parameters:
newIn
- the newInputStream
to set.- Returns:
- the previous underlying
InputStream
.
-