if (coyoteRequest == null)
return -1;
- state = BYTE_STATE;
+ if(state == INITIAL_STATE)
+ state = BYTE_STATE;
int result = coyoteRequest.doRead(bb);
public void realWriteChars(char c[], int off, int len)
throws IOException {
markPos = -1;
+ cb.setOffset(0);
+ cb.setEnd(0);
}
cb.setEnd(0);
}
- int limit = bb.getLength()+cb.getStart();
- if( cb.getLimit() < limit )
- cb.setLimit(limit);
- conv.convert(bb, cb);
- bb.setOffset(bb.getEnd());
state = CHAR_STATE;
+ conv.convert(bb, cb, len);
+ bb.setOffset(bb.getEnd());
return cb.getLength();