private void checkUTF8 ( ByteBuffer buf , int position , int length ) throws UnsupportedEncodingException { int limit = position + length ; for ( int i = position ; i < limit ; i ++ ) { checkUTF8 ( buf . get ( i ) ) ; } }
Check if the given ByteBuffer contains non UTF - 8 data .