Java 类com.fasterxml.jackson.core.util.TextBuffer 实例源码
项目:QuizUpWinner
文件:ReaderBasedJsonParser.java
private String _parseUnusualFieldName2(int paramInt1, int paramInt2, int[] paramArrayOfInt)
{
this._textBuffer.resetWithShared(this._inputBuffer, paramInt1, this._inputPtr - paramInt1);
char[] arrayOfChar1 = this._textBuffer.getCurrentSegment();
int i = this._textBuffer.getCurrentSegmentSize();
int j = paramArrayOfInt.length;
while ((this._inputPtr < this._inputEnd) || (loadMore()))
{
int k = this._inputBuffer[this._inputPtr];
if (k <= j ? paramArrayOfInt[k] != 0 : !Character.isJavaIdentifierPart(k))
break;
this._inputPtr = (1 + this._inputPtr);
paramInt2 = k + paramInt2 * 33;
int i1 = i;
i++;
arrayOfChar1[i1] = k;
if (i >= arrayOfChar1.length)
{
arrayOfChar1 = this._textBuffer.finishCurrentSegment();
i = 0;
}
}
this._textBuffer.setCurrentLength(i);
TextBuffer localTextBuffer = this._textBuffer;
char[] arrayOfChar2 = localTextBuffer.getTextBuffer();
int m = localTextBuffer.getTextOffset();
int n = localTextBuffer.size();
return this._symbols.findSymbol(arrayOfChar2, m, n, paramInt2);
}
项目:QuizUpWinner
文件:ReaderBasedJsonParser.java
protected final void _finishString()
{
int i = this._inputPtr;
int j = this._inputEnd;
if (i < j)
{
int[] arrayOfInt = CharTypes.getInputCodeLatin1();
int m = arrayOfInt.length;
do
{
int n = this._inputBuffer[i];
if ((n < m) && (arrayOfInt[n] != 0))
{
if (n != 34)
break;
TextBuffer localTextBuffer2 = this._textBuffer;
char[] arrayOfChar2 = this._inputBuffer;
int i1 = this._inputPtr;
localTextBuffer2.resetWithShared(arrayOfChar2, i1, i - i1);
this._inputPtr = (i + 1);
return;
}
i++;
}
while (i < j);
}
TextBuffer localTextBuffer1 = this._textBuffer;
char[] arrayOfChar1 = this._inputBuffer;
int k = this._inputPtr;
localTextBuffer1.resetWithCopy(arrayOfChar1, k, i - k);
this._inputPtr = i;
_finishString2();
}
项目:GitHub
文件:IOContext.java
public TextBuffer constructTextBuffer() {
return new TextBuffer(_bufferRecycler);
}
项目:GitHub
文件:SegmentedStringWriter.java
public SegmentedStringWriter(BufferRecycler br) {
super();
_buffer = new TextBuffer(br);
}
项目:QuizUpWinner
文件:ReaderBasedJsonParser.java
private String _parseFieldName2(int paramInt1, int paramInt2, int paramInt3)
{
this._textBuffer.resetWithShared(this._inputBuffer, paramInt1, this._inputPtr - paramInt1);
char[] arrayOfChar1 = this._textBuffer.getCurrentSegment();
int i = this._textBuffer.getCurrentSegmentSize();
while (true)
{
if ((this._inputPtr >= this._inputEnd) && (!loadMore()))
_reportInvalidEOF(": was expecting closing '" + (char)paramInt3 + "' for name");
char[] arrayOfChar2 = this._inputBuffer;
int j = this._inputPtr;
this._inputPtr = (j + 1);
int k = arrayOfChar2[j];
int m = k;
if (k <= 92)
if (k == 92)
{
m = _decodeEscaped();
}
else if (k <= paramInt3)
{
if (k == paramInt3)
break;
if (k < 32)
_throwUnquotedSpace(k, "name");
}
paramInt2 = k + paramInt2 * 33;
int n = i;
i++;
arrayOfChar1[n] = m;
if (i >= arrayOfChar1.length)
{
arrayOfChar1 = this._textBuffer.finishCurrentSegment();
i = 0;
}
}
this._textBuffer.setCurrentLength(i);
TextBuffer localTextBuffer = this._textBuffer;
char[] arrayOfChar3 = localTextBuffer.getTextBuffer();
int i1 = localTextBuffer.getTextOffset();
int i2 = localTextBuffer.size();
return this._symbols.findSymbol(arrayOfChar3, i1, i2, paramInt2);
}
项目:QuizUpWinner
文件:IOContext.java
public final TextBuffer constructTextBuffer()
{
return new TextBuffer(this._bufferRecycler);
}
项目:QuizUpWinner
文件:SegmentedStringWriter.java
public SegmentedStringWriter(BufferRecycler paramBufferRecycler)
{
this._buffer = new TextBuffer(paramBufferRecycler);
}
项目:QuizUpWinner
文件:JsonStringEncoder.java
public final char[] quoteAsString(String paramString)
{
TextBuffer localTextBuffer1 = this._textBuffer;
Object localObject = localTextBuffer1;
if (localTextBuffer1 == null)
{
TextBuffer localTextBuffer2 = new TextBuffer(null);
localObject = localTextBuffer2;
this._textBuffer = localTextBuffer2;
}
char[] arrayOfChar = ((TextBuffer)localObject).emptyAndGetCurrentSegment();
int[] arrayOfInt = CharTypes.get7BitOutputEscapes();
int i = arrayOfInt.length;
int j = 0;
int k = paramString.length();
int m = 0;
while (j < k)
{
while (true)
{
int n = paramString.charAt(j);
if ((n < i) && (arrayOfInt[n] != 0))
break;
if (m >= arrayOfChar.length)
{
arrayOfChar = ((TextBuffer)localObject).finishCurrentSegment();
m = 0;
}
int i1 = m;
m++;
arrayOfChar[i1] = n;
j++;
if (j >= k)
break label278;
}
int i2 = j;
j++;
int i3 = paramString.charAt(i2);
int i4 = arrayOfInt[i3];
int i5;
if (i4 < 0)
i5 = _appendNumericEscape(i3, this._quoteBuffer);
else
i5 = _appendNamedEscape(i4, this._quoteBuffer);
if (m + i5 > arrayOfChar.length)
{
int i6 = arrayOfChar.length - m;
if (i6 > 0)
System.arraycopy(this._quoteBuffer, 0, arrayOfChar, m, i6);
arrayOfChar = ((TextBuffer)localObject).finishCurrentSegment();
m = i5 - i6;
System.arraycopy(this._quoteBuffer, i6, arrayOfChar, 0, m);
}
else
{
System.arraycopy(this._quoteBuffer, 0, arrayOfChar, m, i5);
m += i5;
}
}
label278: ((TextBuffer)localObject).setCurrentLength(m);
return ((TextBuffer)localObject).contentsAsArray();
}
项目:Beam
文件:IOContext.java
public TextBuffer constructTextBuffer() {
return new TextBuffer(_bufferRecycler);
}
项目:Beam
文件:SegmentedStringWriter.java
public SegmentedStringWriter(BufferRecycler br)
{
super();
_buffer = new TextBuffer(br);
}
项目:joyplus-tv
文件:IOContext.java
public TextBuffer constructTextBuffer() {
return new TextBuffer(_bufferRecycler);
}
项目:joyplus-tv
文件:SegmentedStringWriter.java
public SegmentedStringWriter(BufferRecycler br)
{
super();
_buffer = new TextBuffer(br);
}