Package com.dropbox.core
Class NoThrowOutputStream
- java.lang.Object
- 
- java.io.OutputStream
- 
- com.dropbox.core.NoThrowOutputStream
 
 
- 
- All Implemented Interfaces:
- java.io.Closeable,- java.io.Flushable,- java.lang.AutoCloseable
 
 public final class NoThrowOutputStream extends java.io.OutputStreamWraps an existing output stream, converting all the underlying stream'sIOExceptions to our ownNoThrowOutputStream.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 classNoThrowOutputStream.HiddenException
 - 
Constructor SummaryConstructors Constructor Description NoThrowOutputStream(java.io.OutputStream underlying)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidflush()longgetBytesWritten()voidwrite(byte[] b)voidwrite(byte[] b, int off, int len)voidwrite(int b)
 
- 
- 
- 
Method Detail- 
closepublic void close() - Specified by:
- closein interface- java.lang.AutoCloseable
- Specified by:
- closein interface- java.io.Closeable
- Overrides:
- closein class- java.io.OutputStream
 
 - 
flushpublic void flush() - Specified by:
- flushin interface- java.io.Flushable
- Overrides:
- flushin class- java.io.OutputStream
 
 - 
writepublic void write(byte[] b, int off, int len)- Overrides:
- writein class- java.io.OutputStream
 
 - 
writepublic void write(byte[] b) - Overrides:
- writein class- java.io.OutputStream
 
 - 
writepublic void write(int b) - Specified by:
- writein class- java.io.OutputStream
 
 - 
getBytesWrittenpublic long getBytesWritten() 
 
- 
 
-