org.apache.spark.io
Class SnappyOutputStreamWrapper
Object
java.io.OutputStream
org.apache.spark.io.SnappyOutputStreamWrapper
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable
public final class SnappyOutputStreamWrapper
- extends java.io.OutputStream
Wrapper over SnappyOutputStream which guards against write-after-close and double-close
issues. See SPARK-7660 for more details. This wrapping can be removed if we upgrade to a version
of snappy-java that contains the fix for https://github.com/xerial/snappy-java/issues/107.
| Methods inherited from class Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SnappyOutputStreamWrapper
public SnappyOutputStreamWrapper(org.xerial.snappy.SnappyOutputStream os)
write
public void write(int b)
- Specified by:
write in class java.io.OutputStream
write
public void write(byte[] b)
- Overrides:
write in class java.io.OutputStream
write
public void write(byte[] b,
int off,
int len)
- Overrides:
write in class java.io.OutputStream
flush
public void flush()
- Specified by:
flush in interface java.io.Flushable- Overrides:
flush in class java.io.OutputStream
close
public void close()
- Specified by:
close in interface java.io.Closeable- Overrides:
close in class java.io.OutputStream