Class XmlText

    • Constructor Detail

      • XmlText

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

        Creates new XML resource from specified byte stream and encoding

        name -
        binaryContent -
        originalEncoding -
      • XmlText

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

        Creates new XML resource from specified textual content with encoding

        name -
        textualContent -
        originalEncoding -
    • Method Detail

      • dispose

        public void dispose()

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

        Specified by:
        dispose in interface
      • equals

        public boolean equals(IHtmlResource other)

        Checks this instance with specified on equality.

        other -
      • getEncoding

        public Charset getEncoding()

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

        Specified by:
        getEncoding in interface ITextResource
      • getFilenameWithExtension

        public String getFilenameWithExtension()

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

        Specified by:
        getFilenameWithExtension in interface IHtmlResource
      • getName

        public String getName()

        Returns name of this XML resource without file extension

        Specified by:
        getName in interface IHtmlResource
      • getParsedDocument

        public Document getParsedDocument()

        Returns an "XmlDocument" from this XML resource

      • getTextContent

        public String getTextContent()

        Returns content of this XML resource as a standard string

        Specified by:
        getTextContent in interface IHtmlResource
      • getType_Rename_Namesake

        public IResourceType getType_Rename_Namesake()
      • isDisposed

        public boolean isDisposed()

        Determines whether this XML resource is disposed or not

        Specified by:
        isDisposed in interface IAuxDisposable
      • save

        public void save(String fullPathToFile)

        Saves this XML resource to the specified file

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