private static void GetStringUTFRegion(JNIEnvironment env,int strJREF,int start,int len,Address buf){
  if (traceJNI)   VM.sysWrite("JNI called: GetStringUTFRegion \n");
  RuntimeEntrypoints.checkJNICountDownToGC();
  try {
    String str=(String)env.getJNIRef(strJREF);
    String region=str.substring(start,start + len);
    int utflen=UTF8Convert.utfLength(region) + 1;
    JNIGenericHelpers.createUTFForCFromString(region,buf,utflen);
  }
 catch (  Throwable unexpected) {
    if (traceJNI)     unexpected.printStackTrace(System.err);
    env.recordException(unexpected);
  }
}

private static void GetStringUTFRegion ( JNIEnvironment env , int strJREF , int start , int len , Address buf ) { if ( traceJNI ) VM . sysWrite ( "JNI called: GetStringUTFRegion \n" ) ; RuntimeEntrypoints . checkJNICountDownToGC ( ) ; try { String str = ( String ) env . getJNIRef ( strJREF ) ; String region = str . substring ( start , start + len ) ; int utflen = UTF8Convert . utfLength ( region ) + 1 ; JNIGenericHelpers . createUTFForCFromString ( region , buf , utflen ) ; } catch ( Throwable unexpected ) { if ( traceJNI ) unexpected . printStackTrace ( System . err ) ; env . recordException ( unexpected ) ; } }
getstringutfregion : copy a region of unicode characters from a string to the given buffer , as utf8 characters .
