@Override public void write(char cbuf[]) throws ClosedChannelException { if(isClosed) throw new ClosedChannelException(); final int len = cbuf.length; if(len>0) { if(len==1) { write(cbuf[0]); } else { addSegment( TYPE_STRING, new String(cbuf), 0, len ); length += len; } } }
@Override public void write(char cbuf[], int off, int len) throws ClosedChannelException { if(isClosed) throw new ClosedChannelException(); if(len>0) { if(len==1) { write(cbuf[off]); } else { addSegment( TYPE_STRING, new String(cbuf, off, len), 0, len ); length += len; } } }
if(isClosed) throw new ClosedChannelException(); if(csq==null) { write("null"); } else { final int len = csq.length();
if(isClosed) throw new ClosedChannelException(); if(csq==null) { write("null"); } else { final int len = end-start;