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

    Fields inherited from class java.io.FilterInputStream

    in
  • 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 underlying InputStream in this ReusableInputStream.

    Methods inherited from class java.io.FilterInputStream

    available, close, mark, markSupported, read, read, read, reset, skip

    Methods inherited from class java.io.InputStream

    nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • setInputStream

      public java.io.InputStream setInputStream​(java.io.InputStream newIn)
      Sets a new underlying InputStream in this ReusableInputStream.
      Parameters:
      newIn - the new InputStream to set.
      Returns:
      the previous underlying InputStream.