11 import java.io.CharConversionException;
12 import java.io.IOException;
13 import java.io.OutputStream;
14 import java.io.Writer;
66 _bytes =
new byte[capacity];
84 throw new IllegalStateException(
"Writer not closed or reset");
97 public void write(
char c)
throws IOException {
98 if ((c < 0xd800) || (c > 0xdfff)) {
100 }
else if (c < 0xdc00) {
117 public void write(
int code)
throws IOException {
118 if ((code & 0xffffff80) == 0) {
128 private void write2(
int c)
throws IOException {
129 if ((c & 0xfffff800) == 0) {
138 }
else if ((c & 0xffff0000) == 0) {
151 }
else if ((c & 0xff200000) == 0) {
168 }
else if ((c & 0xf4000000) == 0) {
189 }
else if ((c & 0x80000000) == 0) {
215 throw new CharConversionException(
"Illegal character U+"
216 + Integer.toHexString(c));
228 public void write(
char cbuf[],
int off,
int len)
throws IOException {
229 final int off_plus_len = off + len;
230 for (
int i = off; i < off_plus_len;) {
251 public void write(String str,
int off,
int len)
throws IOException {
252 final int off_plus_len = off + len;
253 for (
int i = off; i < off_plus_len;) {
254 char c = str.charAt(i++);
272 public void write(CharSequence csq)
throws IOException {
273 final int length = csq.length();
274 for (
int i = 0; i < length;) {
275 char c = csq.charAt(i++);
296 public void flush() throws IOException {
306 public void close() throws IOException {
321 throw new IOException(
"Stream closed");