Class AgentUtil

java.lang.Object
io.sf.carte.doc.agent.AgentUtil

public class AgentUtil extends Object
User agent utility methods.
  • Constructor Details

    • AgentUtil

      public AgentUtil()
  • Method Details

    • findCharset

      public static String findCharset(String conType, int afterCommaIndex)
      Find the character encoding in a content-type string.
      Parameters:
      conType - the content-type string.
      afterCommaIndex - the index of the first comma in conType, plus one.
      Returns:
      the character encoding, or null if could not be found.
    • inputStreamToReader

      public static Reader inputStreamToReader(InputStream is, String conType, String contentEncoding, String defaultCharset) throws IOException
      Throws:
      IOException