public static byte[] getByteArray(final ByteString byteString) {
        final BytesCarrier carrier = new BytesCarrier();
        try {
            byteString.writeTo(carrier);
            if (carrier.isValid()) {
                return carrier.getValue();
            }
        } catch (final IOException ignored) {
            // ignored
        }
        return byteString.toByteArray();
    }
Carry the byte[] from {@link ByteString}, if failed,
then call {@link ByteString#toByteArray()}.

@param byteString the byteString source data
@return carried bytes
jraft-core/src/main/java/com/google/protobuf/ZeroByteStringHelper.java