code: @SuppressWarnings("unchecked")
      public static <T> T getEntity(InputStream in, TypeReference<T> reference) {
          // If the entity type is an iterator then return a streaming iterator to prevent Jackson instantiating
          // the entire response in memory.
          Type type = reference.getType();
          if (type instanceof ParameterizedType &&
                  Iterator.class.isAssignableFrom((Class<?>) ((ParameterizedType) type).getRawType())) {
              Type elementType = ((ParameterizedType) type).getActualTypeArguments()[0];
              return (T) streamingIterator(in, typeReferenceFrom(elementType));
          }
  
          // Use Jackson to deserialize the input stream.
          try {
              return JsonHelper.readJson(in, reference);
          } catch (IOException e) {
              throw Throwables.propagate(e);
          }
      }
docs: Reads the entity input stream and deserializes the JSON content to the given type reference.  If the
  type reference is for an iterator then a {@link JsonStreamingArrayParser} will be returned to stream
  the deserialized contents to the caller.