TextTransfer provides a platform specific mechanism
for converting plain text represented as a java String
to a platform specific representation of the data and vice versa.
An example of a java String containing plain text is shown
below:
String textData = "Hello World";
Note the TextTransfer does not change the content of the text
data. For a better integration with the platform, the application should convert
the line delimiters used in the text data to the standard line delimiter used by the
platform.
Transfer
| Modifier and Type | Field and Description |
|---|---|
| private static TextTransfer | |
| private static final String | |
| private static final int | |
| private static final String | |
| private static final int | |
| private static final String | |
| private static final int | |
| private static final String | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv boolean | |
| public static TextTransfer | Returns: the singleton instance of the TextTransfer classReturns the singleton instance of the TextTransfer class. |
| protected int[] | getTypeIds()
Implements abstract org. |
| protected String[] | getTypeNames()
Implements abstract org. |
| public void | javaToNative(Object
a java object, TransferData String containing textan empty transferData)TransferData object that will
be filled in on return with the platform specific format of the dataOverrides org. javaToNative converts plain text
represented by a java String to a platform specific representation.
|
| public Object | Returns: a javaString containing text if the conversion was successful; otherwise nullthe platform specific representation of the data to be converted transferData)Overrides org. nativeToJava converts a platform specific
representation of plain text to a java String.
|
| protected boolean | validate(Object
a java representation of the data to be converted object)Overrides org. |
| _instance | back to summary |
|---|---|
| private static TextTransfer _instance | |
| COMPOUND_TEXT | back to summary |
|---|---|
| private static final String COMPOUND_TEXT | |
| COMPOUND_TEXT_ID | back to summary |
|---|---|
| private static final int COMPOUND_TEXT_ID | |
| STRING | back to summary |
|---|---|
| private static final String STRING | |
| STRING_ID | back to summary |
|---|---|
| private static final int STRING_ID | |
| TEXT_PLAIN_UTF8 | back to summary |
|---|---|
| private static final String TEXT_PLAIN_UTF8 | |
| TEXT_PLAIN_UTF8_ID | back to summary |
|---|---|
| private static final int TEXT_PLAIN_UTF8_ID | |
| UTF8_STRING | back to summary |
|---|---|
| private static final String UTF8_STRING | |
| UTF8_STRING_ID | back to summary |
|---|---|
| private static final int UTF8_STRING_ID | |
| TextTransfer | back to summary |
|---|---|
| private TextTransfer() | |
| checkText | back to summary |
|---|---|
| pack-priv boolean checkText(Object object) | |
| getInstance | back to summary |
|---|---|
| public static TextTransfer getInstance() Returns the singleton instance of the TextTransfer class.
| |
| getTypeIds | back to summary |
|---|---|
| protected int[] getTypeIds() Implements abstract org. Doc from org. Returns the platform specific ids of the data types that can be converted using this transfer agent.
| |
| getTypeNames | back to summary |
|---|---|
| protected String[] getTypeNames() Implements abstract org. Doc from org. Returns the platform specific names of the data types that can be converted using this transfer agent. | |
| javaToNative | back to summary |
|---|---|
| public void javaToNative(Object object, TransferData transferData) Overrides org. This implementation of
| |
| nativeToJava | back to summary |
|---|---|
| public Object nativeToJava(TransferData transferData) Overrides org. This implementation of
| |
| validate | back to summary |
|---|---|
| protected boolean validate(Object object) Overrides org. Doc from org. Test that the object is of the correct format for this Transfer class. | |