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


Java DeserializationContext.returnObjectBuffer方法代碼示例

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


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

示例1: deserialize

import org.codehaus.jackson.map.DeserializationContext; //導入方法依賴的package包/類
public String[] deserialize(JsonParser paramJsonParser, DeserializationContext paramDeserializationContext)
  throws IOException, JsonProcessingException
{
  if (!paramJsonParser.isExpectedStartArrayToken())
    return handleNonArray(paramJsonParser, paramDeserializationContext);
  ObjectBuffer localObjectBuffer = paramDeserializationContext.leaseObjectBuffer();
  Object[] arrayOfObject = localObjectBuffer.resetAndStart();
  int i = 0;
  JsonToken localJsonToken = paramJsonParser.nextToken();
  if (localJsonToken != JsonToken.END_ARRAY)
  {
    if (localJsonToken == JsonToken.VALUE_NULL);
    for (String str = null; ; str = paramJsonParser.getText())
    {
      if (i >= arrayOfObject.length)
      {
        arrayOfObject = localObjectBuffer.appendCompletedChunk(arrayOfObject);
        i = 0;
      }
      int j = i + 1;
      arrayOfObject[i] = str;
      i = j;
      break;
    }
  }
  String[] arrayOfString = (String[])localObjectBuffer.completeAndClearBuffer(arrayOfObject, i, String.class);
  paramDeserializationContext.returnObjectBuffer(localObjectBuffer);
  return arrayOfString;
}
 
開發者ID:zhangjianying,項目名稱:12306-android-Decompile,代碼行數:30,代碼來源:ArrayDeserializers.java

示例2: deserialize

import org.codehaus.jackson.map.DeserializationContext; //導入方法依賴的package包/類
public Object[] deserialize(JsonParser paramJsonParser, DeserializationContext paramDeserializationContext)
  throws IOException, JsonProcessingException
{
  if (!paramJsonParser.isExpectedStartArrayToken())
    return handleNonArray(paramJsonParser, paramDeserializationContext);
  ObjectBuffer localObjectBuffer = paramDeserializationContext.leaseObjectBuffer();
  Object[] arrayOfObject1 = localObjectBuffer.resetAndStart();
  int i = 0;
  TypeDeserializer localTypeDeserializer = this._elementTypeDeserializer;
  JsonToken localJsonToken = paramJsonParser.nextToken();
  if (localJsonToken != JsonToken.END_ARRAY)
  {
    Object localObject;
    if (localJsonToken == JsonToken.VALUE_NULL)
      localObject = null;
    while (true)
    {
      if (i >= arrayOfObject1.length)
      {
        arrayOfObject1 = localObjectBuffer.appendCompletedChunk(arrayOfObject1);
        i = 0;
      }
      int j = i + 1;
      arrayOfObject1[i] = localObject;
      i = j;
      break;
      if (localTypeDeserializer == null)
      {
        localObject = this._elementDeserializer.deserialize(paramJsonParser, paramDeserializationContext);
        continue;
      }
      localObject = this._elementDeserializer.deserializeWithType(paramJsonParser, paramDeserializationContext, localTypeDeserializer);
    }
  }
  if (this._untyped);
  for (Object[] arrayOfObject2 = localObjectBuffer.completeAndClearBuffer(arrayOfObject1, i); ; arrayOfObject2 = localObjectBuffer.completeAndClearBuffer(arrayOfObject1, i, this._elementClass))
  {
    paramDeserializationContext.returnObjectBuffer(localObjectBuffer);
    return arrayOfObject2;
  }
}
 
開發者ID:zhangjianying,項目名稱:12306-android-Decompile,代碼行數:42,代碼來源:ArrayDeserializer.java


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