Class NoThrowInputStream

java.lang.Object
java.io.InputStream
com.dropbox.core.NoThrowInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

public final class NoThrowInputStream extends InputStream
Wraps an existing input stream, converting all the underlying stream's IOExceptions to our own NoThrowInputStream.HiddenException, which is a subclass of RuntimeException. This means that the methods don't have IOException in their throws clauses.

NOTE: The name is slightly misleading in that these methods still might throw an IOException wrapped in a HiddenException, just not an IOException directly.

Also, it does have IOException in the throws clause of close(), but you're not supposed to call that method.

  • Constructor Details

    • NoThrowInputStream

      public NoThrowInputStream(InputStream underlying)
  • Method Details