com.groupdocs.editor.htmlcss.resources.fonts

Class FontResourceBase

  • java.lang.Object
    • com.groupdocs.editor.htmlcss.resources.fonts.FontResourceBase
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      com.groupdocs.editor.handler.Event<com.groupdocs.editor.handler.EventHandler> Disposed
      Event, which occurs when this font is disposed
    • Constructor Summary

      Constructors 
      Constructor and Description
      FontResourceBase() 
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void dispose()
      Disposes this font resource, disposing its content and making most methods and properties non-working
      boolean equals(FontResourceBase other)
      Checks this instance with specified font resource on reference equality
      boolean equals(IHtmlResource other)
      Checks this instance with specified HTML resource on reference equality
      InputStream getByteContent()
      Returns content of this font as byte stream
      String getFilenameWithExtension()
      Returns correct filename of this font resource, which consists of name and extension.
      String getName()
      Returns name of this font resource.
      String getTextContent()
      Returns content of this font as base64-encoded string.
      abstract FontType getType()
      In implementing type should return information about type of specific font resource as an instance of specific FontType type, which encapsulates all type-specific info
      boolean isDisposed()
      Determines whether this font is disposed or not
      void save(String fullPathToFile)
      Saves this font to the specified file
    • Field Detail

      • Disposed

        public final com.groupdocs.editor.handler.Event<com.groupdocs.editor.handler.EventHandler> Disposed
        Event, which occurs when this font is disposed
    • Constructor Detail

      • FontResourceBase

        public FontResourceBase()
    • Method Detail

      • dispose

        public final void dispose()

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

        Specified by:
        dispose in interface com.groupdocs.editor.interfaces.IDisposable
      • equals

        public final boolean equals(FontResourceBase other)

        Checks this instance with specified font resource on reference equality

        Parameters:
        other - Other inheritor of FontResourceBase abstract class
        Returns:
        True if are equal, false if are unequal
      • equals

        public final boolean equals(IHtmlResource other)

        Checks this instance with specified HTML resource on reference equality

        Parameters:
        other - Other inheritor of IHtmlResource interface
        Returns:
        True if are equal, false if are unequal
      • getFilenameWithExtension

        public final String getFilenameWithExtension()

        Returns correct filename of this font resource, which consists of name and extension. Theoretically can differ from the name.

        Specified by:
        getFilenameWithExtension in interface IHtmlResource
        Returns:
      • getName

        public final String getName()

        Returns name of this font resource. Usually doesn't contain filename extension and theoretically can differ from filename.

        Specified by:
        getName in interface IHtmlResource
        Returns:
      • getTextContent

        public final String getTextContent()

        Returns content of this font as base64-encoded string. This value is cached after first invoke.

        Specified by:
        getTextContent in interface IHtmlResource
        Returns:
      • getType

        public abstract FontType getType()

        In implementing type should return information about type of specific font resource as an instance of specific FontType type, which encapsulates all type-specific info

        Specified by:
        getType in interface IHtmlResource
        Returns:
      • isDisposed

        public final boolean isDisposed()

        Determines whether this font is disposed or not

        Specified by:
        isDisposed in interface IAuxDisposable
        Returns:
      • save

        public final void save(String fullPathToFile)

        Saves this font to the specified file

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