Class DaoUtils

java.lang.Object
gov.nasa.pds.registry.common.es.dao.DaoUtils

public class DaoUtils extends Object
Common methods used by DAOs
Author:
karpenko
  • Constructor Details

    • DaoUtils

      public DaoUtils()
  • Method Details

    • getLastLine

      public static String getLastLine(InputStream is)
      This method is used to parse multi-line Elasticsearch error responses. JSON error response is on the last line of a message.
      Parameters:
      is - input stream
      Returns:
      Last line
    • parseList

      public static List<String> parseList(com.google.gson.stream.JsonReader rd) throws IOException
      Throws:
      IOException
    • parseSet

      public static Set<String> parseSet(com.google.gson.stream.JsonReader rd) throws IOException
      Throws:
      IOException