Class CharSequenceResource

    • Constructor Detail

      • CharSequenceResource

        public CharSequenceResource​(String contentType,
                                    CharSequence data)
        Creates a Resource from the given char sequence with its content type
        Parameters:
        contentType - The Content type of the array.
        data - The data
      • CharSequenceResource

        public CharSequenceResource​(String contentType,
                                    CharSequence data,
                                    String filename)
        Creates a Resource from the given char sequence with its content type
        Parameters:
        contentType - The Content type of the array.
        data - The data
        filename - The filename that will be set as the Content-Disposition header.
    • Method Detail

      • writeData

        protected void writeData​(org.apache.wicket.request.Response response,
                                 CharSequence data)
        Description copied from class: BaseDataResource
        Writes the given data to the response
        Specified by:
        writeData in class BaseDataResource<CharSequence>
        Parameters:
        response - The response to write to
        data - The data to write
      • getCharset

        protected Charset getCharset()
        Returns:
        Charset for resource
      • setCharset

        public void setCharset​(Charset charset)
        Sets the character set used for reading this resource.
        Parameters:
        charset - Charset for component