Interface ConfigParser.Content

    • Method Detail

      • mediaType

        Optional<String> mediaType()
        Media type of the content. This method is only called if there is no parser configured.
        Returns:
        content media type if known, empty otherwise
      • data

        InputStream data()
        Data of this config source.
        Returns:
        the data of the underlying source to be parsed by a ConfigParser
      • charset

        Charset charset()
        Charset configured by the config source or UTF-8 if none configured.
        Returns:
        charset to use when reading data() if needed by the parser
      • create

        static ConfigParser.Content create​(InputStream data,
                                           String mediaType,
                                           Object stamp)
        Create content from data, media type and a stamp. If not all are available, construct content using builder()
        Parameters:
        data - input stream to underlying data
        mediaType - content media type
        stamp - stamp of the content
        Returns:
        content built from provided information