title: How do I truncate a java string to fit in a given number of bytes, once UTF-8 encoded?
body: <p>How do I truncate a java <code>String</code> so that I know it will fit in a given number of bytes storage once it is UTF-8 encoded?</p>