org.apache.solr.common.util

## Class Utils

- java.lang.Object
- - org.apache.solr.common.util.Utils

-     public class Utils
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Pattern` | `ARRAY_ELEMENT_INDEX`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Utils()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `consumeFully(org.apache.http.HttpEntity entity)` If the passed entity has content, make sure it is fully read and closed.
    `static Object` | `fromJSON(byte[] utf8)`
    `static Object` | `fromJSON(InputStream is)`
    `static Object` | `fromJSONResource(String resourceName)`
    `static Object` | `fromJSONString(String json)`
    `static Collection` | `getDeepCopy(Collection c, int maxDepth, boolean mutable)`
    `static Map` | `getDeepCopy(Map map, int maxDepth)`
    `static Map` | `getDeepCopy(Map map, int maxDepth, boolean mutable)`
    `static Object` | `getObjectByPath(Map root, boolean onlyPrimitive, List<String> hierarchy)`
    `static Object` | `getObjectByPath(Map root, boolean onlyPrimitive, String hierarchy)`
    `static Map<String,Object>` | `makeMap(Object... keyVals)`
    `static byte[]` | `toJSON(Object o)`
    `static String` | `toJSONString(Object o)`
    `static byte[]` | `toUTF8(org.noggit.CharArr out)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### ARRAY_ELEMENT_INDEX

          public static final Pattern ARRAY_ELEMENT_INDEX

  - ### Constructor Detail

    - #### Utils

          public Utils()

  - ### Method Detail

    - #### getDeepCopy

          public static Map getDeepCopy(Map map,
                                        int maxDepth)

    - #### getDeepCopy

          public static Map getDeepCopy(Map map,
                                        int maxDepth,
                                        boolean mutable)

    - #### getDeepCopy

          public static Collection getDeepCopy(Collection c,
                                               int maxDepth,
                                               boolean mutable)

    - #### toJSON

          public static byte[] toJSON(Object o)

    - #### toJSONString

          public static String toJSONString(Object o)

    - #### toUTF8

          public static byte[] toUTF8(org.noggit.CharArr out)

    - #### fromJSON

          public static Object fromJSON(byte[] utf8)

    - #### makeMap

          public static Map<String,Object> makeMap(Object... keyVals)

    - #### fromJSON

          public static Object fromJSON(InputStream is)

    - #### fromJSONResource

          public static Object fromJSONResource(String resourceName)

    - #### fromJSONString

          public static Object fromJSONString(String json)

    - #### getObjectByPath

          public static Object getObjectByPath(Map root,
                                               boolean onlyPrimitive,
                                               String hierarchy)

    - #### getObjectByPath

          public static Object getObjectByPath(Map root,
                                               boolean onlyPrimitive,
                                               List<String> hierarchy)

    - #### consumeFully

          public static void consumeFully(org.apache.http.HttpEntity entity)

      If the passed entity has content, make sure it is fully read and closed.
      Parameters:
        `entity` - to consume or null

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.