helper called by generated code to determine if a byte array is a valid utf-8 encoded string such that the original bytes can be converted to a string object and then back to a byte array round tripping the bytes without loss . more precisely , returns true whenever : arrays.equals bytestring.tobytearray , new string bytestring.tobytearray , `` utf-8 '' . getbytes `` utf-8 '' this method rejects `` overlong '' byte sequences , as well as 3-byte sequences that would map to a surrogate character , in accordance with the restricted definition of utf-8 introduced in unicode 3.1 . note that the utf-8 decoder included in oracle 's jdk has been modified to also reject `` overlong '' byte sequences , but currently 2011 still accepts 3-byte surrogate character byte sequences . see the unicode standard , table 3-6 . utf-8 bit distribution , table 3-7 . well formed utf-8 byte sequences . as of 2011-02 , this method simply returns the result of bytestring #isvalidutf8 . calling that method directly is preferred . concode_field_sep PlaceHolder placeHolder concode_field_sep int getNumber concode_elem_sep T findValueByNumber concode_elem_sep ByteString bytesDefaultValue concode_elem_sep String stringDefaultValue
boolean function ( ByteString arg0 ) { return arg0 . isValidUtf8 ( ) ; }