com.groupdocs.editor.htmlcss.resources.textual

Class TextResourceBase

  • java.lang.Object
    • com.groupdocs.editor.htmlcss.resources.textual.TextResourceBase
    • Field Detail

      • Disposed

        public final com.aspose.ms.lang.Event<com.aspose.ms.System.EventHandler> Disposed
    • Constructor Detail

      • TextResourceBase

        public TextResourceBase(String name,
                        com.aspose.ms.System.IO.Stream binaryContent,
                        com.aspose.ms.System.Text.Encoding originalEncoding)
      • TextResourceBase

        public TextResourceBase(String name,
                        String textualContent,
                        com.aspose.ms.System.Text.Encoding originalEncoding)
    • Method Detail

      • dispose

        public final void dispose()

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

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

        public final boolean equals(IHtmlResource other)

        Checks this instance with specified on equality.

        Parameters:
        other - Other HTML resource of unknown type, that is also presumable TextResourceBase inheritor
        Returns:
        Returns true if are equal, or false if are unequal
      • getByteContent

        public final InputStream getByteContent()

        Returns content of this text resource as byte stream with original encoding

        Specified by:
        getByteContent in interface IHtmlResource
      • getEncoding

        public final Charset getEncoding()

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

      • getEncodingInternal

        public com.aspose.ms.System.Text.Encoding getEncodingInternal()
      • getFilenameWithExtension

        public final String getFilenameWithExtension()

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

        Specified by:
        getFilenameWithExtension in interface IHtmlResource
        Returns:
      • getName

        public final String getName()

        Returns name of this text resource without file extension

        Specified by:
        getName in interface IHtmlResource
        Returns:
      • getTextContent

        public final String getTextContent()

        Returns content of this text resource as a standard string

        Specified by:
        getTextContent in interface IHtmlResource
      • getType

        public abstract TextType getType()

        In implementing type should return information about type of the text resource

        Specified by:
        getType in interface IHtmlResource
        Returns:
      • isDisposed

        public final boolean isDisposed()

        Determines whether this text resource is disposed or not

        Specified by:
        isDisposed in interface IAuxDisposable
      • save

        public final void save(String fullPathToFile)

        Saves this text resource to the specified file

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