mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 13:08:46 +00:00
Add initial local archive export support.
This commit is contained in:
committed by
mtang-signal
parent
c39a1ebdb6
commit
8eb0b2f960
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Copyright 2024 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
package org.signal.core.util.stream
|
||||
|
||||
import java.io.FilterOutputStream
|
||||
import java.io.OutputStream
|
||||
|
||||
/**
|
||||
* Wraps a provided [OutputStream] but ignores calls to [OutputStream.close] on it but will call [OutputStream.flush] just in case.
|
||||
* Wrappers must call [OutputStream.close] on the passed in [wrap] stream directly.
|
||||
*/
|
||||
class NonClosingOutputStream(wrap: OutputStream) : FilterOutputStream(wrap) {
|
||||
override fun close() {
|
||||
flush()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user