2012年4月18日 - Even after that change, it is possible that getBytes() returns a byte array longer that the string length, depending on the platform default charset.
stackoverflow.com