Class UnicodeHelper
- java.lang.Object
-
- org.apache.camel.dataformat.bindy.UnicodeHelper
-
- All Implemented Interfaces:
Serializable
public class UnicodeHelper extends Object implements Serializable
This class replicates the essential parts of the String class in order to aid proper work for Unicode chars in the presense of UTF-16. So for all operations please seeStringwith the same signature. This class is equally immutable.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classUnicodeHelper.MethodDefines how length if a string is defined, i.e how chars are counted.
-
Constructor Summary
Constructors Modifier Constructor Description protectedUnicodeHelper()For Serialization only!UnicodeHelper(String input, UnicodeHelper.Method method)Create instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UnicodeHelper.MethodgetMethod()intindexOf(String str)intindexOf(String str, int fromIndex)intlength()Stringsubstring(int beginIndex)Stringsubstring(int beginIndex, int endIndex)StringtoString()
-
-
-
Constructor Detail
-
UnicodeHelper
public UnicodeHelper(String input, UnicodeHelper.Method method)
Create instance.- Parameters:
input- String, that is to be wrapped.method- Method, that is used to determin "chars" of string.
-
UnicodeHelper
protected UnicodeHelper()
For Serialization only!
-
-
Method Detail
-
getMethod
public UnicodeHelper.Method getMethod()
- Returns:
- Returns the method used to determining the string length.
-
substring
public String substring(int beginIndex)
- See Also:
String.substring(int)
-
substring
public String substring(int beginIndex, int endIndex)
- See Also:
String.substring(int, int)
-
length
public int length()
- See Also:
String.length()
-
indexOf
public int indexOf(String str)
- See Also:
String.indexOf(String)
-
indexOf
public int indexOf(String str, int fromIndex)
- See Also:
String.indexOf(String, int)
-
-