Encoding
Source: aspose.
Represents a character encoding.
Methods
equals(o) → boolean
Determines whether the specified Object is equal to the current instance.
Parameter
| Name | Type | Optional | Description |
|---|---|---|---|
|
o |
Object |
|
The Object to compare with the current instance. |
- Returns
-
booleantrue if value is an instance of Encoding and is equal to the current instance; otherwise, false.
equals(other) → boolean
Determines whether the specified Encoding object is equal to the current instance.
Parameter
| Name | Type | Optional | Description |
|---|---|---|---|
|
other |
|
The Encoding object to compare with the current instance. |
- Returns
-
booleantrue if value is equal to the current instance; otherwise, false.
getASCII() → Encoding
Gets an encoding for the ASCII (7-bit) character set.
- Returns
-
EncodingA Encoding object for the ASCII (7-bit) character set.
getBigEndianUnicode() → Encoding
Gets an encoding for the UTF-16 format using the big endian byte order.
- Returns
-
EncodingA Encoding object for the UTF-16 format using the big endian byte
getDefault() → Encoding
Gets an encoding for the operating system's current ANSI code page.
- Returns
-
EncodingAn encoding for the operating system's current ANSI code page.
getEncoding(codePage) → Encoding
Returns the encoding associated with the specified code page identifier.
Parameter
| Name | Type | Optional | Description |
|---|---|---|---|
|
codePage |
Number |
|
The code page identifier of the preferred encoding. -or- 0, to use the default encoding. |
- Returns
-
EncodingThe Encoding object associated with the specified code page.
getEncoding(charsetName) → Encoding
Returns an encoding associated with the specified charset name.
Parameter
| Name | Type | Optional | Description |
|---|---|---|---|
|
charsetName |
String |
|
specified charset name |
- Returns
-
EncodingThe Encoding object associated with the specified charset name.
getEncoding(charset) → Encoding
Returns an encoding associated with the specified charset object.
Parameter
| Name | Type | Optional | Description |
|---|---|---|---|
|
charset |
Charset |
|
specified charset object |
- Returns
-
EncodingThe Encoding object associated with the specified charset object.
getUTF7() → Encoding
Gets an encoding for the UTF-7 format.
- Returns
-
EncodingA Encoding object for the UTF-7 format.
getUTF8() → Encoding
Gets an encoding for the UTF-8 format.
- Returns
-
EncodingA Encoding object for the UTF-8 format.
getUTF8NoBOM() → Encoding
Gets an encoding for the UTF-8 format without the UTF-8 identifier.
- Returns
-
EncodingA Encoding object for the UTF-8 format without UTF-8 identifier.
getUnicode() → Encoding
Gets an encoding for the UTF-16 format using the little endian byte order.
- Returns
-
EncodingA Encoding object for the UTF-16 format using the little endian byte