@Override public void write(char[] cbuf) { _buffer.append(cbuf, 0, cbuf.length); }
@Override public void write(int c) { _buffer.append((char) c); }
@Override public void write(char[] cbuf, int off, int len) { _buffer.append(cbuf, off, len); }
@Override public void write(String str, int off, int len) { _buffer.append(str, off, len); }
@Override public void write(char[] cbuf, int off, int len) { _buffer.append(cbuf, off, len); }
@Override public void write(int c) { _buffer.append((char) c); }
@Override public void write(char[] cbuf) { _buffer.append(cbuf, 0, cbuf.length); }
@Override public Writer append(CharSequence csq) { String str = csq.toString(); _buffer.append(str, 0, str.length()); return this; }
@Override public void write(String str, int off, int len) { _buffer.append(str, off, len); }
@Override public void write(String str) { _buffer.append(str, 0, str.length()); }
@Override public Writer append(CharSequence csq, int start, int end) { String str = csq.subSequence(start, end).toString(); _buffer.append(str, 0, str.length()); return this; }
@Override public void write(String str) { _buffer.append(str, 0, str.length()); }
@Override public Writer append(CharSequence csq) { String str = csq.toString(); _buffer.append(str, 0, str.length()); return this; }
@Override public Writer append(CharSequence csq, int start, int end) { String str = csq.subSequence(start, end).toString(); _buffer.append(str, 0, str.length()); return this; }
public void resetWithCopy(char[] buf, int start, int len) { _inputBuffer = null; _inputStart = -1; // indicates shared buffer not used _inputLen = 0; _resultString = null; _resultArray = null; // And then reset internal input buffers, if necessary: if (_hasSegments) { clearSegments(); } else if (_currentSegment == null) { _currentSegment = buf(len); } _currentSize = _segmentSize = 0; append(buf, start, len); }
/** * @since 2.9 */ public void resetWithCopy(String text, int start, int len) { _inputBuffer = null; _inputStart = -1; _inputLen = 0; _resultString = null; _resultArray = null; if (_hasSegments) { clearSegments(); } else if (_currentSegment == null) { _currentSegment = buf(len); } _currentSize = _segmentSize = 0; append(text, start, len); }
private final boolean _decodeSplitUTF8_3(int prev, int prevCount, int next) throws IOException { if (prevCount == 1) { if ((next & 0xC0) != 0x080) { _reportInvalidOther(next & 0xFF, _inputPtr); } prev = (prev << 6) | (next & 0x3F); if (_inputPtr >= _inputEnd) { _minorState = MINOR_VALUE_STRING_UTF8_3; _pending32 = prev; _pendingBytes = 2; return false; } next = _inputBuffer[_inputPtr++]; } if ((next & 0xC0) != 0x080) { _reportInvalidOther(next & 0xFF, _inputPtr); } _textBuffer.append((char) ((prev << 6) | (next & 0x3F))); return true; }
protected JsonToken _finishErrorToken() throws IOException { while (_inputPtr < _inputEnd) { int i = (int) _inputBuffer[_inputPtr++]; // !!! TODO: Decode UTF-8 characters properly... // char c = (char) _decodeCharForError(i); char ch = (char) i; if (Character.isJavaIdentifierPart(ch)) { // 11-Jan-2016, tatu: note: we will fully consume the character, // included or not, so if recovery was possible, it'd be off-by-one... _textBuffer.append(ch); if (_textBuffer.size() < MAX_ERROR_TOKEN_LENGTH) { continue; } } return _reportErrorToken(_textBuffer.contentsAsString()); } return (_currToken = JsonToken.NOT_AVAILABLE); }
public void resetWithCopy(char[] buf, int start, int len) { _inputBuffer = null; _inputStart = -1; // indicates shared buffer not used _inputLen = 0; _resultString = null; _resultArray = null; // And then reset internal input buffers, if necessary: if (_hasSegments) { clearSegments(); } else if (_currentSegment == null) { _currentSegment = buf(len); } _currentSize = _segmentSize = 0; append(buf, start, len); }