Here you can find the source of bytesToByteString(byte[] bytes)
public static ByteString bytesToByteString(byte[] bytes)
//package com.java2s; //License from project: Open Source License import com.google.protobuf.ByteString; public class Main { public static ByteString bytesToByteString(byte[] bytes) { return ByteString.copyFrom(bytes); }/* w w w. j a va 2 s . co m*/ }