ARM and UTF-8 work

This commit is contained in:
JET
2010-04-14 09:26:50 -06:00
parent 3e5b2cbc7b
commit b2f5e71d22
8 changed files with 305 additions and 324 deletions

View File

@ -10,6 +10,8 @@
package java.io;
import avian.Utf8;
public class OutputStreamWriter extends Writer {
private final OutputStream out;
@ -18,11 +20,7 @@ public class OutputStreamWriter extends Writer {
}
public void write(char[] b, int offset, int length) throws IOException {
byte[] buffer = new byte[length];
for (int i = 0; i < length; ++i) {
buffer[i] = (byte) b[i + offset];
}
out.write(buffer);
out.write(Utf8.encode(b, offset, length));
}
public void flush() throws IOException {