TextualFormats
Inheritance: java.lang.Object
All Implemented Interfaces: com.groupdocs.editor.formats.IDocumentFormat
public class TextualFormats implements IDocumentFormat
Encapsulates all textual (text-based) formats, including markup (XML, HTML) and others. Includes the following formats: Html, Txt, Xml. Md, Json.
Constructors
Constructor | Description |
---|---|
TextualFormats() |
Fields
Field | Description |
---|---|
Html | HyperText Markup Language document (HTML) is the extension for web pages created for display in browsers. |
Xml | eXtensible Markup Language document (XML) that is similar to HTML but different in using tags for defining objects. |
Txt | Plain Text Document (TXT) represents a text document that contains plain text in the form of lines. |
Md | Markdown is a lightweight markup language for creating formatted text using a plain-text editor. |
Json | JSON (JavaScript Object Notation) is an open standard file format for sharing data that uses human-readable text to store and transmit data. |
Mhtml | MIME encapsulation of aggregate HTML documents is a web page archive format used to combine, in a single computer file, the HTML code and its companion resources. |
Chm | Microsoft Compiled HTML Help is a Microsoft proprietary online help binary format, consisting of a collection of HTML pages, an index and other navigation tools. |
All | Returns an internal class, that provides enumerable possibilities over all existing Textual formats. |
Methods
Method | Description |
---|---|
getName() | Returns a formal full name of this textual format |
getExtension() | Returns an extension (without leading dot character) of this textual format in lower case |
getMime() | Returns a MIME code for this format |
toString() | Returns the name of this particular format, same as ‘Name’ property |
op_Equality(TextualFormats first, TextualFormats second) | Checks two given TextualFormats instances on equality |
op_Inequality(TextualFormats first, TextualFormats second) | Checks two given TextualFormats instances on inequality |
equals(TextualFormats other) | Determines whether this instance is equal to the other specified TextualFormats instance |
equals(IDocumentFormat other) | Determines whether this instance is equal to the other specified IDocumentFormat instance |
equals(Object obj) | Determines whether this instance is equal to the other specified object, that is presumably of boxed TextualFormats |
hashCode() | Returns a hash-code, that is immutable for this instance |
fromExtension(String extension) | Returns instance of TextualFormats structure, associated to specified filename extension, or throws an exception, if extension cannot be properly parsed |
TextualFormats()
public TextualFormats()
Html
public static final TextualFormats Html
HyperText Markup Language document (HTML) is the extension for web pages created for display in browsers. Learn more about this file format here.
Xml
public static final TextualFormats Xml
eXtensible Markup Language document (XML) that is similar to HTML but different in using tags for defining objects. Learn more about this file format here.
Txt
public static final TextualFormats Txt
Plain Text Document (TXT) represents a text document that contains plain text in the form of lines. Learn more about this file format here.
Md
public static final TextualFormats Md
Markdown is a lightweight markup language for creating formatted text using a plain-text editor. Learn more about this file format here.
Json
public static final TextualFormats Json
JSON (JavaScript Object Notation) is an open standard file format for sharing data that uses human-readable text to store and transmit data. Learn more about this file format here.
Mhtml
public static final TextualFormats Mhtml
MIME encapsulation of aggregate HTML documents is a web page archive format used to combine, in a single computer file, the HTML code and its companion resources. Learn more about this file format here .
Chm
public static final TextualFormats Chm
Microsoft Compiled HTML Help is a Microsoft proprietary online help binary format, consisting of a collection of HTML pages, an index and other navigation tools. Learn more about this file format here .
All
public static final TextualFormats.AllEnumerable All
Returns an internal class, that provides enumerable possibilities over all existing Textual formats.
getName()
public final String getName()
Returns a formal full name of this textual format
Returns: java.lang.String
getExtension()
public final String getExtension()
Returns an extension (without leading dot character) of this textual format in lower case
Returns: java.lang.String
getMime()
public final String getMime()
Returns a MIME code for this format
Returns: java.lang.String
toString()
public String toString()
Returns the name of this particular format, same as ‘Name’ property
Returns: java.lang.String - A String that represents this instance
op_Equality(TextualFormats first, TextualFormats second)
public static boolean op_Equality(TextualFormats first, TextualFormats second)
Checks two given TextualFormats instances on equality
Parameters:
Parameter | Type | Description |
---|---|---|
first | TextualFormats | First TextualFormats instance to check |
second | TextualFormats | Second TextualFormats instance to check |
Returns: boolean - True if are equal, false if are unequal
op_Inequality(TextualFormats first, TextualFormats second)
public static boolean op_Inequality(TextualFormats first, TextualFormats second)
Checks two given TextualFormats instances on inequality
Parameters:
Parameter | Type | Description |
---|---|---|
first | TextualFormats | First TextualFormats instance to check |
second | TextualFormats | Second TextualFormats instance to check |
Returns: boolean - True if are not equal, false if are equal
equals(TextualFormats other)
public final boolean equals(TextualFormats other)
Determines whether this instance is equal to the other specified TextualFormats instance
Parameters:
Parameter | Type | Description |
---|---|---|
other | TextualFormats | Other TextualFormats instance, that should be checked on equality with this |
Returns: boolean - True if are equal, false if are unequal
equals(IDocumentFormat other)
public final boolean equals(IDocumentFormat other)
Determines whether this instance is equal to the other specified IDocumentFormat instance
Parameters:
Parameter | Type | Description |
---|---|---|
other | IDocumentFormat | Other IDocumentFormat instance. If it is not a TextualFormats, method will return ‘false’ |
Returns: boolean - True if are equal, false if are unequal
equals(Object obj)
public boolean equals(Object obj)
Determines whether this instance is equal to the other specified object, that is presumably of boxed TextualFormats
Parameters:
Parameter | Type | Description |
---|---|---|
obj | java.lang.Object | Other boxed TextualFormats instance |
Returns: boolean - True if are equal, false if are unequal
hashCode()
public int hashCode()
Returns a hash-code, that is immutable for this instance
Returns: int - Signed 4-byte integer
fromExtension(String extension)
public static TextualFormats fromExtension(String extension)
Returns instance of TextualFormats structure, associated to specified filename extension, or throws an exception, if extension cannot be properly parsed
Parameters:
Parameter | Type | Description |
---|---|---|
extension | java.lang.String | Filename extension of any supportable textual format, with or without leading dot character, case-independent. Cannot be NULL or empty, should be valid. |
Returns: TextualFormats - Instance of TextualFormats structure on success or thrown exception on failure