Interface ConfigParser.Content<S>

    • Method Detail

      • stamp

        default Optional<S> stamp()
        A modification stamp of the content.

        Default implementation returns Instant.EPOCH.

        Returns:
        a stamp of the content
      • mediaType

        String mediaType()
        Returns configuration content media type.
        Returns:
        content media type
      • create

        static <S> ConfigParser.Content<S> create​(Readable readable,
                                                  String mediaType,
                                                  Optional<S> stamp)
        Creates ConfigParser.Content from given readable content and with specified mediaType of configuration format.
        Type Parameters:
        S - a type of data stamp
        Parameters:
        readable - a readable providing configuration. If it implements AutoCloseable it is automatically closed whenever parsed.
        mediaType - a configuration mediaType
        stamp - content stamp
        Returns:
        a config content