public class BidiConvert
extends java.lang.Object
It contains 2 public methods: toUnicode() and toSbcs().
Method toUnicode() must be called by the ByteToChar converters after converting the SBCS byte data into Unicode.
Method toSbcs() must be called by the CharToByte converters before converting the Unicode string data into byte data.
Constructor and Description |
---|
BidiConvert() |
Modifier and Type | Method and Description |
---|---|
boolean |
isBidiData(char[] input,
int inStart,
int inEnd,
java.lang.String bidiParms,
java.lang.String encoding)
This method checks if a char array needs Bidi transformation.
|
boolean |
isBidiData(java.nio.CharBuffer input,
boolean UseBuffer,
java.lang.String bidiParms,
java.lang.String encoding)
This method checks if a CharBuffer needs Bidi transformation.
|
boolean |
isBidiData(java.lang.String input,
java.lang.String bidiParms,
java.lang.String encoding)
This method checks if a string needs Bidi transformation.
|
boolean |
isBidiEnv(java.lang.String bidiParms,
java.lang.String encoding)
This method checks if the environment allows Bidi transformations for the current encoding.
|
char[] |
toSbcs(char[] input,
int inStart,
int inEnd,
java.lang.String bidiParms,
java.lang.String encoding)
This method converts a char array from the Bidi attributes used inside the
JVM to those used outside the JVM.
|
java.nio.CharBuffer |
toSbcs(java.nio.CharBuffer input,
boolean UseBuffer,
java.lang.String bidiParms,
java.lang.String encoding)
This method converts a CharBuffer from the Bidi attributes used inside the
JVM to those used outside the JVM.
|
java.lang.String |
toSbcs(java.lang.String input,
java.lang.String bidiParms,
java.lang.String encoding)
This method converts a string from the Bidi attributes used inside the
JVM to those used outside the JVM.
|
char[] |
toUnicode(char[] input,
int inStart,
int inEnd,
java.lang.String bidiParms,
java.lang.String encoding)
This method converts a char array from the Bidi attributes used outside the
JVM to those used inside the JVM.
|
java.nio.CharBuffer |
toUnicode(java.nio.CharBuffer input,
boolean UseBuffer,
java.lang.String bidiParms,
java.lang.String encoding)
This method converts a CharBuffer from the Bidi attributes used outside the
JVM to those used inside the JVM.
|
java.lang.String |
toUnicode(java.lang.String input,
java.lang.String bidiParms,
java.lang.String encoding)
This method converts a string from the Bidi attributes used outside the
JVM to those used inside the JVM.
|
public boolean isBidiEnv(java.lang.String bidiParms, java.lang.String encoding)
bidiParms
- The environment variable containing the specifications of the Bidi attributes.encoding
- The encoding of the data outside the JVM.public boolean isBidiData(char[] input, int inStart, int inEnd, java.lang.String bidiParms, java.lang.String encoding)
input
- The input char array containing text in Unicode.inStart
- Offset in input array.inEnd
- Offset of last byte to be converted.bidiParms
- The environment variable containing the specifications of the Bidi attributes.encoding
- The encoding of the data outside the JVM.public boolean isBidiData(java.lang.String input, java.lang.String bidiParms, java.lang.String encoding)
input
- The input string.bidiParms
- The environment variable containing the specifications of the Bidi attributes.encoding
- The encoding of the data outside the JVM.public boolean isBidiData(java.nio.CharBuffer input, boolean UseBuffer, java.lang.String bidiParms, java.lang.String encoding)
input
- The input buffer.UseBuffer
- flag to prevent use of char array in CharBuffer.bidiParms
- The environment variable containing the specifications of the Bidi attributes.encoding
- The encoding of the data outside the JVM.public char[] toUnicode(char[] input, int inStart, int inEnd, java.lang.String bidiParms, java.lang.String encoding)
input
- The input char array.inStart
- Offset in input array.inEnd
- Offset of last byte to be converted.bidiParms
- The environment variable containing the specifications of the Bidi attributes.encoding
- The encoding of the data outside the JVM.public java.lang.String toUnicode(java.lang.String input, java.lang.String bidiParms, java.lang.String encoding)
input
- The input string.bidiParms
- The environment variable containing the specifications of the Bidi attributes.encoding
- The encoding of the data outside the JVM.public java.nio.CharBuffer toUnicode(java.nio.CharBuffer input, boolean UseBuffer, java.lang.String bidiParms, java.lang.String encoding)
input
- The input buffer.UseBuffer
- flag to prevent use of char array in CharBuffer.bidiParms
- The environment variable containing the specifications of the Bidi attributes.encoding
- The encoding of the data outside the JVM.public char[] toSbcs(char[] input, int inStart, int inEnd, java.lang.String bidiParms, java.lang.String encoding)
input
- The input char array.inStart
- Offset in input array.inEnd
- Offset of last byte to be converted.bidiParms
- The environment variable containing the specifications of the Bidi attributes.encoding
- The encoding of the data outside the JVM.public java.lang.String toSbcs(java.lang.String input, java.lang.String bidiParms, java.lang.String encoding)
input
- The input string.bidiParms
- The environment variable containing the specifications of the Bidi attributes.encoding
- The encoding of the data outside the JVM.public java.nio.CharBuffer toSbcs(java.nio.CharBuffer input, boolean UseBuffer, java.lang.String bidiParms, java.lang.String encoding)
input
- The input buffer.UseBuffer
- flag to prevent use of char array in CharBuffer.bidiParms
- The environment variable containing the specifications of the Bidi attributes.encoding
- The encoding of the data outside the JVM.