aboutsummaryrefslogtreecommitdiffstats
path: root/libraries/spongycastle/core/src/main/java/org/spongycastle/util/io/TeeInputStream.java
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/spongycastle/core/src/main/java/org/spongycastle/util/io/TeeInputStream.java')
-rw-r--r--libraries/spongycastle/core/src/main/java/org/spongycastle/util/io/TeeInputStream.java62
1 files changed, 0 insertions, 62 deletions
diff --git a/libraries/spongycastle/core/src/main/java/org/spongycastle/util/io/TeeInputStream.java b/libraries/spongycastle/core/src/main/java/org/spongycastle/util/io/TeeInputStream.java
deleted file mode 100644
index 1e62eb548..000000000
--- a/libraries/spongycastle/core/src/main/java/org/spongycastle/util/io/TeeInputStream.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package org.spongycastle.util.io;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-public class TeeInputStream
- extends InputStream
-{
- private final InputStream input;
- private final OutputStream output;
-
- public TeeInputStream(InputStream input, OutputStream output)
- {
- this.input = input;
- this.output = output;
- }
-
- public int read(byte[] buf)
- throws IOException
- {
- return read(buf, 0, buf.length);
- }
-
- public int read(byte[] buf, int off, int len)
- throws IOException
- {
- int i = input.read(buf, off, len);
-
- if (i > 0)
- {
- output.write(buf, off, i);
- }
-
- return i;
- }
-
- public int read()
- throws IOException
- {
- int i = input.read();
-
- if (i >= 0)
- {
- output.write(i);
- }
-
- return i;
- }
-
- public void close()
- throws IOException
- {
- this.input.close();
- this.output.close();
- }
-
- public OutputStream getOutputStream()
- {
- return output;
- }
-}