Package com.dropbox.core
Class NoThrowInputStream
- java.lang.Object
- 
- java.io.InputStream
- 
- com.dropbox.core.NoThrowInputStream
 
 
- 
- All Implemented Interfaces:
- java.io.Closeable,- java.lang.AutoCloseable
 
 public final class NoThrowInputStream extends java.io.InputStreamWraps an existing input stream, converting all the underlying stream'sIOExceptions to our ownNoThrowInputStream.HiddenException, which is a subclass ofRuntimeException. This means that the methods don't haveIOExceptionin theirthrowsclauses.NOTE: The name is slightly misleading in that these methods still might throw an IOExceptionwrapped in aHiddenException, just not anIOExceptiondirectly.Also, it does have IOExceptionin thethrowsclause ofclose(), but you're not supposed to call that method.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classNoThrowInputStream.HiddenException
 - 
Constructor SummaryConstructors Constructor Description NoThrowInputStream(java.io.InputStream underlying)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()longgetBytesRead()intread()intread(byte[] b)intread(byte[] b, int off, int len)
 
- 
- 
- 
Method Detail- 
closepublic void close() - Specified by:
- closein interface- java.lang.AutoCloseable
- Specified by:
- closein interface- java.io.Closeable
- Overrides:
- closein class- java.io.InputStream
 
 - 
readpublic int read() - Specified by:
- readin class- java.io.InputStream
 
 - 
readpublic int read(byte[] b, int off, int len)- Overrides:
- readin class- java.io.InputStream
 
 - 
readpublic int read(byte[] b) - Overrides:
- readin class- java.io.InputStream
 
 - 
getBytesReadpublic long getBytesRead() 
 
- 
 
-