docs: @Override
  	public byte[] encode(T t) throws IOException {
  		if (t == null) {
  			throw new RuntimeException("target object to encode is null.");
  		}
  
  		int size = size(t);
  		byte[] bytes = new byte[size];
  		CodedOutputStream out = CodedOutputStream.newInstance(bytes);
  		writeTo(t, out);
  
  		return bytes;
  	}