fm.common.UncloseableOutputStream.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fm-common_2.11 Show documentation
Show all versions of fm-common_2.11 Show documentation
Common Scala classes that we use at Frugal Mechanic / Eluvio
The newest version!
package fm.common
import java.io.{FilterOutputStream, OutputStream}
object UncloseableOutputStream {
def apply(in: OutputStream): UncloseableOutputStream = new UncloseableOutputStream(in)
}
/**
* Wraps an OutputStream and makes the close() method do nothing
*/
final class UncloseableOutputStream(in: OutputStream) extends FilterOutputStream(in) {
override def close(): Unit = { }
}