- 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;
+ }
+ }