public String convertFromJavaString ( String string , boolean useUnicode ) { int firstEscapeSequence = string . indexOf ( ' ' ) ; if ( firstEscapeSequence == - 1 ) { return string ; } int length = string . length ( ) ; StringBuilder result = new StringBuilder ( length ) ; appendRegion ( string , 0 , firstEscapeSequence , result ) ; return convertFromJavaString ( string , useUnicode , firstEscapeSequence , result ) ; }
Resolve Java control character sequences to the actual character value . Optionally handle unicode escape sequences too .