what-the-bank/sources/org/bouncycastle/util/io/TeeOutputStream.java

46 lines
1.3 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package org.bouncycastle.util.io;
import java.io.IOException;
import java.io.OutputStream;
/* loaded from: classes6.dex */
public class TeeOutputStream extends OutputStream {
private OutputStream output1;
private OutputStream output2;
@Override // java.io.OutputStream
public void write(byte[] bArr, int i, int i2) throws IOException {
this.output1.write(bArr, i, i2);
this.output2.write(bArr, i, i2);
}
@Override // java.io.OutputStream
public void write(byte[] bArr) throws IOException {
this.output1.write(bArr);
this.output2.write(bArr);
}
@Override // java.io.OutputStream
public void write(int i) throws IOException {
this.output1.write(i);
this.output2.write(i);
}
@Override // java.io.OutputStream, java.io.Flushable
public void flush() throws IOException {
this.output1.flush();
this.output2.flush();
}
@Override // java.io.OutputStream, java.io.Closeable, java.lang.AutoCloseable
public void close() throws IOException {
this.output1.close();
this.output2.close();
}
public TeeOutputStream(OutputStream outputStream, OutputStream outputStream2) {
this.output1 = outputStream;
this.output2 = outputStream2;
}
}