當前位置: 首頁>>代碼示例>>Java>>正文


Java JsonEncoding.UTF32_BE屬性代碼示例

本文整理匯總了Java中org.codehaus.jackson.JsonEncoding.UTF32_BE屬性的典型用法代碼示例。如果您正苦於以下問題:Java JsonEncoding.UTF32_BE屬性的具體用法?Java JsonEncoding.UTF32_BE怎麽用?Java JsonEncoding.UTF32_BE使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在org.codehaus.jackson.JsonEncoding的用法示例。


在下文中一共展示了JsonEncoding.UTF32_BE屬性的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: detectEncoding

public JsonEncoding detectEncoding()
  throws IOException, JsonParseException
{
  int j;
  int i;
  if (ensureLoaded(4))
  {
    j = this._inputBuffer[this._inputPtr] << 24 | (0xFF & this._inputBuffer[(1 + this._inputPtr)]) << 16 | (0xFF & this._inputBuffer[(2 + this._inputPtr)]) << 8 | 0xFF & this._inputBuffer[(3 + this._inputPtr)];
    if (handleBOM(j))
      i = 1;
  }
  JsonEncoding localJsonEncoding;
  while (i == 0)
  {
    localJsonEncoding = JsonEncoding.UTF8;
    this._context.setEncoding(localJsonEncoding);
    return localJsonEncoding;
    if (checkUTF32(j))
    {
      i = 1;
      continue;
    }
    boolean bool3 = checkUTF16(j >>> 16);
    i = 0;
    if (!bool3)
      continue;
    i = 1;
    continue;
    boolean bool1 = ensureLoaded(2);
    i = 0;
    if (!bool1)
      continue;
    boolean bool2 = checkUTF16((0xFF & this._inputBuffer[this._inputPtr]) << 8 | 0xFF & this._inputBuffer[(1 + this._inputPtr)]);
    i = 0;
    if (!bool2)
      continue;
    i = 1;
  }
  if (this._bytesPerChar == 2)
  {
    if (this._bigEndian);
    for (localJsonEncoding = JsonEncoding.UTF16_BE; ; localJsonEncoding = JsonEncoding.UTF16_LE)
      break;
  }
  if (this._bytesPerChar == 4)
  {
    if (this._bigEndian);
    for (localJsonEncoding = JsonEncoding.UTF32_BE; ; localJsonEncoding = JsonEncoding.UTF32_LE)
      break;
  }
  throw new RuntimeException("Internal error");
}
 
開發者ID:zhangjianying,項目名稱:12306-android-Decompile,代碼行數:52,代碼來源:ByteSourceBootstrapper.java

示例2: detectEncoding

public final JsonEncoding detectEncoding()
{
  int i = 1;
  int j;
  JsonEncoding localJsonEncoding;
  if (ensureLoaded(4))
  {
    j = this._inputBuffer[this._inputPtr] << 24 | (0xFF & this._inputBuffer[(1 + this._inputPtr)]) << 16 | (0xFF & this._inputBuffer[(2 + this._inputPtr)]) << 8 | 0xFF & this._inputBuffer[(3 + this._inputPtr)];
    if (handleBOM(j))
    {
      if (i != 0)
        break label177;
      localJsonEncoding = JsonEncoding.UTF8;
    }
  }
  while (true)
  {
    this._context.setEncoding(localJsonEncoding);
    return localJsonEncoding;
    if ((checkUTF32(j)) || (checkUTF16(j >>> 16)))
      break;
    do
    {
      i = 0;
      break;
    }
    while ((!ensureLoaded(2)) || (!checkUTF16((0xFF & this._inputBuffer[this._inputPtr]) << 8 | 0xFF & this._inputBuffer[(1 + this._inputPtr)])));
    break;
    label177: switch (this._bytesPerChar)
    {
    case 3:
    default:
      throw new RuntimeException("Internal error");
    case 1:
      localJsonEncoding = JsonEncoding.UTF8;
      break;
    case 2:
      if (this._bigEndian)
        localJsonEncoding = JsonEncoding.UTF16_BE;
      else
        localJsonEncoding = JsonEncoding.UTF16_LE;
      break;
    case 4:
      if (this._bigEndian)
        localJsonEncoding = JsonEncoding.UTF32_BE;
      else
        localJsonEncoding = JsonEncoding.UTF32_LE;
      break;
    }
  }
}
 
開發者ID:isnuryusuf,項目名稱:ingress-indonesia-dev,代碼行數:51,代碼來源:ByteSourceBootstrapper.java


注:本文中的org.codehaus.jackson.JsonEncoding.UTF32_BE屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。