text: public void write(byte[] buffer, int offset, int length) {Arrays.checkOffsetAndCount(buffer.length, offset, length);synchronized (this) {if (out == null) {setError();return;}try {out.write(buffer, offset, length);if (autoFlush) {flush();}} catch (IOException e) {setError();}}}