public static ByteString bytesDefaultValue(String bytes) {
    try {
      return ByteString.copyFrom(bytes.getBytes("ISO-8859-1"));
    } catch (UnsupportedEncodingException e) {
      // This should never happen since all JVMs are required to implement
      // ISO-8859-1.
      throw new IllegalStateException(
          "Java VM does not support a standard character set.", e);
    }
  }
public static ByteString bytesDefaultValue ( String bytes ) { try { return ByteString . copyFrom ( bytes . getBytes ( "ISO-8859-1" ) ) ; } catch ( UnsupportedEncodingException e ) { throw new IllegalStateException ( "Java VM does not support a standard character set." , e ) ; } }
Helper called by generated code to construct default values for bytes
fields.
<p>
This is a lot like {@link #stringDefaultValue}, but for bytes fields.
In this case we only need the second of the two hacks -- allowing us to
embed raw bytes as a string literal with ISO-8859-1 encoding.