public final class XmlText extends Object implements ITextResource
Represents one textual resource, which is a XML.
Modifier and Type | Field and Description |
---|---|
com.groupdocs.editor.events.ProcessEvents<com.groupdocs.editor.events.ProcessEventHandler> |
Disposed
Event, which occurs when this XML resource is disposed
|
Constructor and Description |
---|
XmlText(String name,
InputStream binaryContent,
Charset originalEncoding)
Creates new XML resource from specified byte stream and encoding
|
XmlText(String name,
String textualContent,
Charset originalEncoding)
Creates new XML resource from specified textual content with encoding
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Disposes this XML resource, disposing its content and making most methods and properties non-working
|
boolean |
equals(IHtmlResource other)
Checks this instance with specified on equality.
|
boolean |
equals(Object obj)
Determines whether the specified Object is equal to the current Object.
|
InputStream |
getByteContent()
Returns content of this XML resource as byte stream with original encoding
|
Charset |
getEncoding()
Returns encoding of this XML resource.
|
String |
getFilenameWithExtension()
Returns correct filename of this XML resource, which consists of name and extension
|
String |
getName()
Returns name of this XML resource without file extension
|
Document |
getParsedDocument()
Returns an "XmlDocument" from this XML resource
|
String |
getTextContent()
Returns content of this XML resource as a standard string
|
TextType |
getType()
Returns TextType.Xml
|
IResourceType |
getTypeInstance()
Gets the type of the current instance.
|
int |
hashCode()
Serves as a hash function for a particular type.
|
boolean |
isDisposed()
Determines whether this XML resource is disposed or not
|
void |
save(String fullPathToFile)
Saves this XML resource to the specified file
|
public final com.groupdocs.editor.events.ProcessEvents<com.groupdocs.editor.events.ProcessEventHandler> Disposed
Event, which occurs when this XML resource is disposed
public XmlText(String name, InputStream binaryContent, Charset originalEncoding)
Creates new XML resource from specified byte stream and encoding
name
- Name of the XML resource without file extension.binaryContent
- Content as byte stream. Reading begins from original position. Cannot be null.originalEncoding
- Encoding of the XML resource.public XmlText(String name, String textualContent, Charset originalEncoding)
Creates new XML resource from specified textual content with encoding
name
- Name of the XML resource without file extension.textualContent
- Content of the XML resource as a standard string.originalEncoding
- Encoding of the XML resource.public void dispose()
Disposes this XML resource, disposing its content and making most methods and properties non-working
dispose
in interface com.aspose.ms.System.IDisposable
public boolean equals(IHtmlResource other)
Checks this instance with specified on equality.
other
- IHtmlResourcepublic boolean equals(Object obj)
Determines whether the specified Object is equal to the current Object.
public InputStream getByteContent()
Returns content of this XML resource as byte stream with original encoding
getByteContent
in interface IHtmlResource
public Charset getEncoding()
Returns encoding of this XML resource. Usually returns UTF-8.
getEncoding
in interface ITextResource
public String getFilenameWithExtension()
Returns correct filename of this XML resource, which consists of name and extension
getFilenameWithExtension
in interface IHtmlResource
public String getName()
Returns name of this XML resource without file extension
getName
in interface IHtmlResource
public Document getParsedDocument()
Returns an "XmlDocument" from this XML resource
public String getTextContent()
Returns content of this XML resource as a standard string
getTextContent
in interface IHtmlResource
public TextType getType()
Returns TextType.Xml
getType
in interface IHtmlResource
getType
in interface ITextResource
public IResourceType getTypeInstance()
Gets the type of the current instance.
public int hashCode()
Serves as a hash function for a particular type.
public boolean isDisposed()
Determines whether this XML resource is disposed or not
isDisposed
in interface IAuxDisposable
public void save(String fullPathToFile)
Saves this XML resource to the specified file
save
in interface IHtmlResource
fullPathToFile
- Full path to the file, which will be created or rewritedCopyright © 2018. All rights reserved.