本文整理汇总了Java中com.fasterxml.jackson.core.io.CharTypes.getInputCodeComment方法的典型用法代码示例。如果您正苦于以下问题:Java CharTypes.getInputCodeComment方法的具体用法?Java CharTypes.getInputCodeComment怎么用?Java CharTypes.getInputCodeComment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.fasterxml.jackson.core.io.CharTypes
的用法示例。
在下文中一共展示了CharTypes.getInputCodeComment方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: _skipLine
import com.fasterxml.jackson.core.io.CharTypes; //导入方法依赖的package包/类
/**
* Method for skipping contents of an input line; usually for CPP
* and YAML style comments.
*/
private final void _skipLine() throws IOException
{
// Ok: need to find EOF or linefeed
final int[] codes = CharTypes.getInputCodeComment();
while ((_inputPtr < _inputEnd) || _loadMore()) {
int i = (int) _inputBuffer[_inputPtr++] & 0xFF;
int code = codes[i];
if (code != 0) {
switch (code) {
case INT_LF:
++_currInputRow;
_currInputRowStart = _inputPtr;
return;
case INT_CR:
_skipCR();
return;
case '*': // nop for these comments
break;
case 2: // 2-byte UTF
_skipUtf8_2();
break;
case 3: // 3-byte UTF
_skipUtf8_3();
break;
case 4: // 4-byte UTF
_skipUtf8_4(i);
break;
default: // e.g. -1
if (code < 0) {
// Is this good enough error message?
_reportInvalidChar(i);
}
}
}
}
}
示例2: _skipCComment
import com.fasterxml.jackson.core.io.CharTypes; //导入方法依赖的package包/类
private final void _skipCComment() throws IOException
{
// Need to be UTF-8 aware here to decode content (for skipping)
final int[] codes = CharTypes.getInputCodeComment();
int i = _inputData.readUnsignedByte();
// Ok: need the matching '*/'
main_loop:
while (true) {
int code = codes[i];
if (code != 0) {
switch (code) {
case '*':
i = _inputData.readUnsignedByte();
if (i == INT_SLASH) {
return;
}
continue main_loop;
case INT_LF:
case INT_CR:
++_currInputRow;
break;
case 2: // 2-byte UTF
_skipUtf8_2();
break;
case 3: // 3-byte UTF
_skipUtf8_3();
break;
case 4: // 4-byte UTF
_skipUtf8_4();
break;
default: // e.g. -1
// Is this good enough error message?
_reportInvalidChar(i);
}
}
i = _inputData.readUnsignedByte();
}
}
示例3: _skipLine
import com.fasterxml.jackson.core.io.CharTypes; //导入方法依赖的package包/类
/**
* Method for skipping contents of an input line; usually for CPP
* and YAML style comments.
*/
private final void _skipLine() throws IOException
{
// Ok: need to find EOF or linefeed
final int[] codes = CharTypes.getInputCodeComment();
while (true) {
int i = _inputData.readUnsignedByte();
int code = codes[i];
if (code != 0) {
switch (code) {
case INT_LF:
case INT_CR:
++_currInputRow;
return;
case '*': // nop for these comments
break;
case 2: // 2-byte UTF
_skipUtf8_2();
break;
case 3: // 3-byte UTF
_skipUtf8_3();
break;
case 4: // 4-byte UTF
_skipUtf8_4();
break;
default: // e.g. -1
if (code < 0) {
// Is this good enough error message?
_reportInvalidChar(i);
}
}
}
}
}
示例4: _skipCppComment
import com.fasterxml.jackson.core.io.CharTypes; //导入方法依赖的package包/类
private void _skipCppComment()
{
int[] arrayOfInt = CharTypes.getInputCodeComment();
while ((this._inputPtr < this._inputEnd) || (loadMore()))
{
byte[] arrayOfByte = this._inputBuffer;
int i = this._inputPtr;
this._inputPtr = (i + 1);
int j = 0xFF & arrayOfByte[i];
int k = arrayOfInt[j];
if (k != 0)
switch (k)
{
default:
break;
case 10:
_skipLF();
return;
case 13:
_skipCR();
return;
case 42:
break;
case 2:
_skipUtf8_2(j);
break;
case 3:
_skipUtf8_3(j);
break;
case 4:
_skipUtf8_4(j);
continue;
_reportInvalidChar(j);
}
}
}
示例5: _skipLine
import com.fasterxml.jackson.core.io.CharTypes; //导入方法依赖的package包/类
/**
* Method for skipping contents of an input line; usually for CPP
* and YAML style comments.
*/
private final void _skipLine() throws IOException
{
// Ok: need to find EOF or linefeed
final int[] codes = CharTypes.getInputCodeComment();
while ((_inputPtr < _inputEnd) || loadMore()) {
int i = (int) _inputBuffer[_inputPtr++] & 0xFF;
int code = codes[i];
if (code != 0) {
switch (code) {
case INT_LF:
++_currInputRow;
_currInputRowStart = _inputPtr;
return;
case INT_CR:
_skipCR();
return;
case '*': // nop for these comments
break;
case 2: // 2-byte UTF
_skipUtf8_2(i);
break;
case 3: // 3-byte UTF
_skipUtf8_3(i);
break;
case 4: // 4-byte UTF
_skipUtf8_4(i);
break;
default: // e.g. -1
if (code < 0) {
// Is this good enough error message?
_reportInvalidChar(i);
}
}
}
}
}
示例6: _skipCppComment
import com.fasterxml.jackson.core.io.CharTypes; //导入方法依赖的package包/类
private void _skipCppComment()
throws IOException, JsonParseException
{
// Ok: need to find EOF or linefeed
final int[] codes = CharTypes.getInputCodeComment();
while ((_inputPtr < _inputEnd) || loadMore()) {
int i = (int) _inputBuffer[_inputPtr++] & 0xFF;
int code = codes[i];
if (code != 0) {
switch (code) {
case INT_LF:
_skipLF();
return;
case INT_CR:
_skipCR();
return;
case INT_ASTERISK: // nop for these comments
break;
case 2: // 2-byte UTF
_skipUtf8_2(i);
break;
case 3: // 3-byte UTF
_skipUtf8_3(i);
break;
case 4: // 4-byte UTF
_skipUtf8_4(i);
break;
default: // e.g. -1
// Is this good enough error message?
_reportInvalidChar(i);
}
}
}
}
示例7: _skipCComment
import com.fasterxml.jackson.core.io.CharTypes; //导入方法依赖的package包/类
private final void _skipCComment() throws IOException
{
// Need to be UTF-8 aware here to decode content (for skipping)
final int[] codes = CharTypes.getInputCodeComment();
// Ok: need the matching '*/'
main_loop:
while ((_inputPtr < _inputEnd) || _loadMore()) {
int i = (int) _inputBuffer[_inputPtr++] & 0xFF;
int code = codes[i];
if (code != 0) {
switch (code) {
case '*':
if (_inputPtr >= _inputEnd && !_loadMore()) {
break main_loop;
}
if (_inputBuffer[_inputPtr] == INT_SLASH) {
++_inputPtr;
return;
}
break;
case INT_LF:
++_currInputRow;
_currInputRowStart = _inputPtr;
break;
case INT_CR:
_skipCR();
break;
case 2: // 2-byte UTF
_skipUtf8_2();
break;
case 3: // 3-byte UTF
_skipUtf8_3();
break;
case 4: // 4-byte UTF
_skipUtf8_4(i);
break;
default: // e.g. -1
// Is this good enough error message?
_reportInvalidChar(i);
}
}
}
_reportInvalidEOF(" in a comment", null);
}
示例8: _skipCComment
import com.fasterxml.jackson.core.io.CharTypes; //导入方法依赖的package包/类
private void _skipCComment()
{
int[] arrayOfInt = CharTypes.getInputCodeComment();
while ((this._inputPtr < this._inputEnd) || (loadMore()))
{
byte[] arrayOfByte = this._inputBuffer;
int i = this._inputPtr;
this._inputPtr = (i + 1);
int j = 0xFF & arrayOfByte[i];
int k = arrayOfInt[j];
if (k != 0)
switch (k)
{
default:
break;
case 42:
if ((this._inputPtr >= this._inputEnd) && (!loadMore()))
break label216;
if (this._inputBuffer[this._inputPtr] == 47)
{
this._inputPtr = (1 + this._inputPtr);
return;
}
break;
case 10:
_skipLF();
break;
case 13:
_skipCR();
break;
case 2:
_skipUtf8_2(j);
break;
case 3:
_skipUtf8_3(j);
break;
case 4:
_skipUtf8_4(j);
continue;
_reportInvalidChar(j);
}
}
label216: _reportInvalidEOF(" in a comment");
}
示例9: _skipCComment
import com.fasterxml.jackson.core.io.CharTypes; //导入方法依赖的package包/类
private final void _skipCComment() throws IOException
{
// Need to be UTF-8 aware here to decode content (for skipping)
final int[] codes = CharTypes.getInputCodeComment();
// Ok: need the matching '*/'
main_loop:
while ((_inputPtr < _inputEnd) || loadMore()) {
int i = (int) _inputBuffer[_inputPtr++] & 0xFF;
int code = codes[i];
if (code != 0) {
switch (code) {
case '*':
if (_inputPtr >= _inputEnd && !loadMore()) {
break main_loop;
}
if (_inputBuffer[_inputPtr] == INT_SLASH) {
++_inputPtr;
return;
}
break;
case INT_LF:
++_currInputRow;
_currInputRowStart = _inputPtr;
break;
case INT_CR:
_skipCR();
break;
case 2: // 2-byte UTF
_skipUtf8_2(i);
break;
case 3: // 3-byte UTF
_skipUtf8_3(i);
break;
case 4: // 4-byte UTF
_skipUtf8_4(i);
break;
default: // e.g. -1
// Is this good enough error message?
_reportInvalidChar(i);
}
}
}
_reportInvalidEOF(" in a comment");
}
示例10: _skipCComment
import com.fasterxml.jackson.core.io.CharTypes; //导入方法依赖的package包/类
private void _skipCComment()
throws IOException, JsonParseException
{
// Need to be UTF-8 aware here to decode content (for skipping)
final int[] codes = CharTypes.getInputCodeComment();
// Ok: need the matching '*/'
main_loop:
while ((_inputPtr < _inputEnd) || loadMore()) {
int i = (int) _inputBuffer[_inputPtr++] & 0xFF;
int code = codes[i];
if (code != 0) {
switch (code) {
case INT_ASTERISK:
if (_inputPtr >= _inputEnd && !loadMore()) {
break main_loop;
}
if (_inputBuffer[_inputPtr] == INT_SLASH) {
++_inputPtr;
return;
}
break;
case INT_LF:
_skipLF();
break;
case INT_CR:
_skipCR();
break;
case 2: // 2-byte UTF
_skipUtf8_2(i);
break;
case 3: // 3-byte UTF
_skipUtf8_3(i);
break;
case 4: // 4-byte UTF
_skipUtf8_4(i);
break;
default: // e.g. -1
// Is this good enough error message?
_reportInvalidChar(i);
}
}
}
_reportInvalidEOF(" in a comment");
}