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 InputStreams under the same InputStream instance.-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protectedReusableInputStream(java.io.InputStream in) -
Method Summary
Modifier and Type Method Description java.io.InputStreamsetInputStream(java.io.InputStream newIn)Sets a new underlyingInputStreamin 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 underlyingInputStreamin thisReusableInputStream.- Parameters:
newIn- the newInputStreamto set.- Returns:
- the previous underlying
InputStream.
-