Class AbstractStringResourceStream

    • Field Detail

      • DEFAULT_CONTENT_TYPE

        public static final java.lang.String DEFAULT_CONTENT_TYPE
        The content-type applied in case the resource stream's default constructor is used
        See Also:
        Constant Field Values
    • Constructor Detail

      • AbstractStringResourceStream

        public AbstractStringResourceStream()
        Constructor.
      • AbstractStringResourceStream

        public AbstractStringResourceStream​(java.lang.String contentType)
        Constructor.
        Parameters:
        contentType - The mime type of this resource, such as "image/jpeg" or "text/html"
    • Method Detail

      • getCharset

        protected java.nio.charset.Charset getCharset()
        Returns:
        Charset for resource
      • setCharset

        public void setCharset​(java.nio.charset.Charset charset)
        Sets the character set used for reading this resource.
        Specified by:
        setCharset in interface IStringResourceStream
        Parameters:
        charset - Charset for component
      • close

        public void close()
                   throws java.io.IOException
        Description copied from interface: IResourceStream
        Closes the resource. Normally, this includes closing any underlying input stream returned by getInputStream().
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface IResourceStream
        Throws:
        java.io.IOException
        See Also:
        IResourceStream.close()
      • setLastModified

        public void setLastModified​(java.time.Instant lastModified)
        Parameters:
        lastModified - The lastModified to set.
      • getString

        protected abstract java.lang.String getString()
        Returns:
        The string resource