|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.starteam.util.Encoding
public final class Encoding
A platform-independent representation of a character encoding, with methods for enumerating encodings, determining which are supported by the current platform, etc.
| Field Summary | |
|---|---|
static int |
CODEPAGE_UNKNOWN
Used to represent a code page that is unknown or undefined. |
static int |
ID_UNKNOWN
Used to represent an encoding ID that is unknown or undefined. |
static Encoding |
ISO_8859_1
ISO Latin Alphabet 1 (ISO-LATIN-1). |
static java.lang.String |
STARTEAM_PROPERTY
Set this system property at startup to override the default StarTeam encoding for the current process. |
static Encoding |
US_ASCII
Seven-bit ASCII (ISO646-US, the Basic Latin block of the Unicode character set). |
static Encoding |
UTF_16
Sixteen-bit UCS Transformation Format, byte-order identified by an optional byte-order mark. |
static Encoding |
UTF_16BE
Sixteen-bit UCS Transformation Format, big-endian byte-order. |
static Encoding |
UTF_16LE
Sixteen-bit UCS Transformation Format, little-endian byte-order. |
static Encoding |
UTF_32
32-bit UCS Transformation Format, byte-order identified by an optional byte-order mark. |
static Encoding |
UTF_32BE
32-bit UCS Transformation Format, big-endian byte-order. |
static Encoding |
UTF_32LE
32-bit UCS Transformation Format, little-endian byte-order. |
static Encoding |
UTF_8
Eight-bit UCS Transformation Format. |
| Method Summary | |
|---|---|
static Encoding |
forCodePage(int cp)
Gets the encoding corresponding to the given code page. |
static Encoding |
forID(int id)
Gets the encoding registered under the given unique ID with the Internet Assigned Numbers Authority (IANA). |
static Encoding |
forName(java.lang.String name)
Gets the encoding with the given name. |
static Encoding[] |
getAllKnownEncodings()
Gets a list of all known encodings. |
java.lang.String[] |
getAllNames()
Gets all known names for this encoding. |
int |
getCodePage()
Gets the codePage of this encoding. |
static Encoding |
getDefaultPlatformEncoding()
Gets the default platform encoding. |
static Encoding |
getDefaultStarTeamEncoding()
Gets the default StarTeam encoding. |
java.lang.String |
getMimeName()
Gets the preferred MIME name of this encoding. |
java.lang.String |
getName()
Gets the common name of this encoding. |
java.lang.String |
getPlatformName()
Gets the name by which this encoding is known on this platform. |
java.lang.String |
getPlatformNameForReading()
Gets a name that can be used to read this encoding on this platform. |
java.lang.String |
getPlatformNameForWriting()
Gets a name that can be used to write this encoding on this platform. |
static Encoding[] |
getReadableEncodings()
Gets a list of all encodings supported for reading by the current platform. |
int |
getRegisteredID()
Gets the unique ID of this encoding, as registered with the Internet Assigned Numbers Authority (IANA). |
java.lang.String |
getRegisteredName()
Gets the name of this encoding, as registered with the Internet Assigned Numbers Authority (IANA). |
static Encoding[] |
getSupportedEncodings()
Gets a list of all encodings supported by the current platform. |
static Encoding[] |
getWritableEncodings()
Gets a list of all encodings supported for writing by the current platform. |
boolean |
isNamed(java.lang.String name)
Determines whether or not the given name refers to this encoding. |
boolean |
isReadingSupported()
Determines whether or not this encoding is supported for reading by the current platform. |
boolean |
isSupported()
Determines whether or not this encoding is fully supported by the current platform. |
boolean |
isWritingSupported()
Determines whether or not this encoding is supported for writing by the current platform. |
static void |
setDefaultStarTeamEncoding(Encoding e)
Sets the default StarTeam encoding. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String STARTEAM_PROPERTY
public static final int ID_UNKNOWN
Encoding.getRegisteredID(),
Constant Field Valuespublic static final int CODEPAGE_UNKNOWN
Encoding.getCodePage(),
Constant Field Valuespublic static final Encoding US_ASCII
public static final Encoding ISO_8859_1
public static final Encoding UTF_8
public static final Encoding UTF_16BE
public static final Encoding UTF_16LE
public static final Encoding UTF_16
public static final Encoding UTF_32BE
public static final Encoding UTF_32LE
public static final Encoding UTF_32
| Method Detail |
|---|
public static Encoding getDefaultStarTeamEncoding()
public static void setDefaultStarTeamEncoding(Encoding e)
e - The default StarTeam encoding, or null to restore the platform
default.public static Encoding getDefaultPlatformEncoding()
public static Encoding forName(java.lang.String name)
name - An encoding name. May be the common name, the registered IANA
name, or any known alias. Encoding names are not case
sensitive.
Encoding.getAllNames()public static Encoding forID(int id)
id - The MIBenum of the desired encoding, as registered with IANA.
Encoding.getRegisteredID()public static Encoding forCodePage(int cp)
cp - The code page of the desired encoding.
Encoding.getCodePage()public static Encoding[] getAllKnownEncodings()
Encoding.getName(),
Encoding.getSupportedEncodings()public static Encoding[] getSupportedEncodings()
Encoding.getPlatformName(),
Encoding.getAllKnownEncodings(),
Encoding.getReadableEncodings(),
Encoding.getWritableEncodings()public static Encoding[] getReadableEncodings()
Encoding.getPlatformNameForReading(),
Encoding.getSupportedEncodings(),
Encoding.getWritableEncodings()public static Encoding[] getWritableEncodings()
Encoding.getPlatformNameForWriting(),
Encoding.getSupportedEncodings(),
Encoding.getReadableEncodings()public java.lang.String getName()
Encoding.forName(java.lang.String),
Encoding.getMimeName(),
Encoding.getRegisteredName(),
Encoding.getAllNames()public java.lang.String getMimeName()
Encoding.getName()public java.lang.String getRegisteredName()
Encoding.getName()public java.lang.String[] getAllNames()
Encoding.getName()public boolean isNamed(java.lang.String name)
name - The name to be tested. Encoding names are not case sensitive.
Encoding.getAllNames()public int getRegisteredID()
Encoding.forID(int),
Encoding.getRegisteredName()public int getCodePage()
Encoding.forCodePage(int)public boolean isSupported()
Encoding.getSupportedEncodings(),
Encoding.getPlatformName(),
Encoding.isReadingSupported(),
Encoding.isWritingSupported()public java.lang.String getPlatformName()
Encoding.isSupported(),
Encoding.getPlatformNameForReading(),
Encoding.getPlatformNameForWriting()public boolean isReadingSupported()
Encoding.getPlatformNameForReading(),
Encoding.isSupported(),
Encoding.isWritingSupported()public java.lang.String getPlatformNameForReading()
Encoding.isReadingSupported(),
Encoding.getPlatformNameForWriting()public boolean isWritingSupported()
Encoding.getPlatformNameForWriting(),
Encoding.isSupported(),
Encoding.isReadingSupported()public java.lang.String getPlatformNameForWriting()
Encoding.isWritingSupported(),
Encoding.getPlatformNameForReading()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||