licensing update to APSL 2.0
[org.ibex.io.git] / src / org / ibex / io / Stream.java
index 83a8193..f1869d1 100644 (file)
@@ -1,4 +1,7 @@
-// Copyright 2004 Adam Megacz, see the COPYING file for licensing [LGPL]
+// Copyright 2000-2005 the Contributors, as shown in the revision logs.
+// Licensed under the Apache Public Source License 2.0 ("the License").
+// You may not use this file except in compliance with the License.
+
 package org.ibex.io;
 
 import java.io.*;
@@ -246,15 +249,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;
+           }
+       }
     }
 }