X-Git-Url: http://git.megacz.com/?p=org.ibex.io.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fio%2FStream.java;fp=src%2Forg%2Fibex%2Fio%2FStream.java;h=b31c9a6c88d0dcec589968b74fcf38db4224e325;hp=83a81939aaea175f2fb4d7f962cddb9981215332;hb=0a8f7a78d5e62d0353b83c5fb7847d54ca285b3b;hpb=64cd1d56deb8a25285b8edd51b2f78b54fae66d3 diff --git a/src/org/ibex/io/Stream.java b/src/org/ibex/io/Stream.java index 83a8193..b31c9a6 100644 --- a/src/org/ibex/io/Stream.java +++ b/src/org/ibex/io/Stream.java @@ -246,15 +246,16 @@ public class Stream { } finally { flushing = false; } } - Writer unreader = new OutputStreamWriter(new OutputStream() { - public void close() { } - public void write(int i) throws IOException { byte[] b = new byte[1]; b[0] = (byte)i; write(b, 0, 1); } - public void write(byte[] b) throws IOException { write(b, 0, b.length); } - public void write(byte[] b, int p, int l) { - ensureb2(l); - System.arraycopy(b, p, buf, start-l, l); - start -= l; - } - }); + Writer unreader = new OutputStreamWriter(new InOutputStream()); + private class InOutputStream extends OutputStream { + public void close() { } + public void write(int i) throws IOException { byte[] b = new byte[1]; b[0] = (byte)i; write(b, 0, 1); } + public void write(byte[] b) throws IOException { write(b, 0, b.length); } + public void write(byte[] b, int p, int l) { + ensureb2(l); + System.arraycopy(b, p, buf, start-l, l); + start -= l; + } + } } }