Package com.google.protobuf

Examples of com.google.protobuf.AbstractMessage


  }

  /** {@inheritDoc} */
  @Override
  public synchronized <T> byte[] encode(final T cellValue) throws IOException {
    final AbstractMessage message = (AbstractMessage) cellValue;
    if (mProtoClass != message.getClass()) {
      throw new IOException(String.format(
          "Protocol buffer of class '%s' (message name '%s') "
          + "does not match expected class '%s' (message name '%s'): %s.",
          cellValue.getClass().getName(), message.getDescriptorForType().getFullName(),
          mProtoClass.getName(), mProtobufFullName,
          cellValue));
    }
    return message.toByteArray();
  }
View Full Code Here

TOP

Related Classes of com.google.protobuf.AbstractMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.