com.groupdocs.editor.htmlcss.resources.textual

Class CssText

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      com.groupdocs.editor.events.ProcessEvents<com.groupdocs.editor.events.ProcessEventHandler> Disposed
      Event, which occurs when this CSS resource is disposed
    • Constructor Summary

      Constructors 
      Constructor and Description
      CssText(String name, InputStream binaryContent, Charset originalEncoding)
      Creates new CSS resource from specified byte stream and encoding
      CssText(String name, String textualContent, Charset originalEncoding)
      Creates new CSS resource from specified textual content with encoding
    • Field Detail

      • Disposed

        public final com.groupdocs.editor.events.ProcessEvents<com.groupdocs.editor.events.ProcessEventHandler> Disposed

        Event, which occurs when this CSS resource is disposed

    • Constructor Detail

      • CssText

        public CssText(String name,
               InputStream binaryContent,
               Charset originalEncoding)

        Creates new CSS resource from specified byte stream and encoding

        Parameters:
        name - Name of the CSS resource.
        binaryContent - Content of the CSS resource as InputStream.
        originalEncoding - Encoding of this CSS resource.
      • CssText

        public CssText(String name,
               String textualContent,
               Charset originalEncoding)

        Creates new CSS resource from specified textual content with encoding

        Parameters:
        name - Name of the CSS resource.
        textualContent - Content of the CSS resource as a standard string.
        originalEncoding - Encoding of this CSS resource.
    • Method Detail

      • dispose

        public void dispose()

        Disposes this CSS resource, disposing its content and making most methods and properties non-working

        Specified by:
        dispose in interface com.aspose.ms.System.IDisposable
      • equals

        public boolean equals(IHtmlResource other)

        Checks this instance with specified on equality.

      • equals

        public boolean equals(Object obj)

        Gets the type of the current instance.

        Overrides:
        equals in class Object
      • getEncoding

        public Charset getEncoding()

        Returns encoding of this CSS resource. Usually returns UTF-8.

        Specified by:
        getEncoding in interface ITextResource
      • getFilenameWithExtension

        public String getFilenameWithExtension()

        Returns correct filename of this CSS resource, which consists of name and extension

        Specified by:
        getFilenameWithExtension in interface IHtmlResource
      • getName

        public String getName()

        Returns name of this CSS resource without file extension

        Specified by:
        getName in interface IHtmlResource
      • getTextContent

        public String getTextContent()

        Returns content of this CSS resource as a standard string

        Specified by:
        getTextContent in interface IHtmlResource
      • getTypeInstance

        public IResourceType getTypeInstance()

        Gets the type of the current instance.

      • hashCode

        public int hashCode()

        Gets the type of the current instance.

        Overrides:
        hashCode in class Object
      • isDisposed

        public boolean isDisposed()

        Determines whether this CSS resource is disposed or not

        Specified by:
        isDisposed in interface IAuxDisposable
      • save

        public void save(String fullPathToFile)

        Saves this CSS resource to the specified file

        Specified by:
        save in interface IHtmlResource
        Parameters:
        fullPathToFile - Full path to the file, which will be created or rewrited