diff options
Diffstat (limited to 'libraries/spongycastle/core/src/main/j2me/java/io/FilterOutputStream.java')
-rw-r--r-- | libraries/spongycastle/core/src/main/j2me/java/io/FilterOutputStream.java | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/libraries/spongycastle/core/src/main/j2me/java/io/FilterOutputStream.java b/libraries/spongycastle/core/src/main/j2me/java/io/FilterOutputStream.java new file mode 100644 index 000000000..52cfb74b1 --- /dev/null +++ b/libraries/spongycastle/core/src/main/j2me/java/io/FilterOutputStream.java @@ -0,0 +1,39 @@ +package java.io; + +public class FilterOutputStream extends OutputStream +{ + protected OutputStream out; + + protected FilterOutputStream(OutputStream underlying) + { + out = underlying; + } + + public void write(int b) throws IOException + { + out.write(b); + } + + public void write(byte[] b) throws IOException + { + write(b, 0, b.length); + } + + public void write(byte[] b, int offset, int length) throws IOException + { + for (int i = 0; i < length; i++) + { + write(b[offset + i]); + } + } + + public void flush() throws IOException + { + out.flush(); + } + + public void close() throws IOException + { + out.close(); + } +} |