Java 类com.google.protobuf.ExtensionRegistryLite 实例源码

项目:TextSecureSMP    文件:PushSMPMessageProtos.java   
public PushSMPMessageProtos.PushSMPMessageContent.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException {
    PushSMPMessageProtos.PushSMPMessageContent parsedMessage = null;

    try {
        parsedMessage = (PushSMPMessageProtos.PushSMPMessageContent)PushSMPMessageProtos.PushSMPMessageContent.PARSER.parsePartialFrom(input, extensionRegistry);
    } catch (InvalidProtocolBufferException var8) {
        parsedMessage = (PushSMPMessageProtos.PushSMPMessageContent)var8.getUnfinishedMessage();
        throw var8;
    } finally {
        if(parsedMessage != null) {
            this.mergeFrom(parsedMessage);
        }

    }

    return this;
}
项目:TextSecureSMP    文件:PushSMPMessageProtos.java   
public PushSMPMessageProtos.PushSMPMessageContent.SyncMessageContext.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException {
    PushSMPMessageProtos.PushSMPMessageContent.SyncMessageContext parsedMessage = null;

    try {
        parsedMessage = (PushSMPMessageProtos.PushSMPMessageContent.SyncMessageContext)PushSMPMessageProtos.PushSMPMessageContent.SyncMessageContext.PARSER.parsePartialFrom(input, extensionRegistry);
    } catch (InvalidProtocolBufferException var8) {
        parsedMessage = (PushSMPMessageProtos.PushSMPMessageContent.SyncMessageContext)var8.getUnfinishedMessage();
        throw var8;
    } finally {
        if(parsedMessage != null) {
            this.mergeFrom(parsedMessage);
        }

    }

    return this;
}
项目:TextSecureSMP    文件:PushSMPMessageProtos.java   
public PushSMPMessageProtos.PushSMPMessageContent.GroupContext.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException {
    PushSMPMessageProtos.PushSMPMessageContent.GroupContext parsedMessage = null;

    try {
        parsedMessage = (PushSMPMessageProtos.PushSMPMessageContent.GroupContext)PushSMPMessageProtos.PushSMPMessageContent.GroupContext.PARSER.parsePartialFrom(input, extensionRegistry);
    } catch (InvalidProtocolBufferException var8) {
        parsedMessage = (PushSMPMessageProtos.PushSMPMessageContent.GroupContext)var8.getUnfinishedMessage();
        throw var8;
    } finally {
        if(parsedMessage != null) {
            this.mergeFrom(parsedMessage);
        }

    }

    return this;
}
项目:TextSecureSMP    文件:PushSMPMessageProtos.java   
public PushSMPMessageProtos.PushSMPMessageContent.AttachmentPointer.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException {
    PushSMPMessageProtos.PushSMPMessageContent.AttachmentPointer parsedMessage = null;

    try {
        parsedMessage = (PushSMPMessageProtos.PushSMPMessageContent.AttachmentPointer)PushSMPMessageProtos.PushSMPMessageContent.AttachmentPointer.PARSER.parsePartialFrom(input, extensionRegistry);
    } catch (InvalidProtocolBufferException var8) {
        parsedMessage = (PushSMPMessageProtos.PushSMPMessageContent.AttachmentPointer)var8.getUnfinishedMessage();
        throw var8;
    } finally {
        if(parsedMessage != null) {
            this.mergeFrom(parsedMessage);
        }

    }

    return this;
}
项目:TextSecureSMP    文件:PushSMPMessageProtos.java   
public PushSMPMessageProtos.IncomingPushMessageSignal.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException {
    PushSMPMessageProtos.IncomingPushMessageSignal parsedMessage = null;

    try {
        parsedMessage = (PushSMPMessageProtos.IncomingPushMessageSignal)PushSMPMessageProtos.IncomingPushMessageSignal.PARSER.parsePartialFrom(input, extensionRegistry);
    } catch (InvalidProtocolBufferException var8) {
        parsedMessage = (PushSMPMessageProtos.IncomingPushMessageSignal)var8.getUnfinishedMessage();
        throw var8;
    } finally {
        if(parsedMessage != null) {
            this.mergeFrom(parsedMessage);
        }

    }

    return this;
}
项目:jprotobuf    文件:MapEntryLite.java   
/**
 * Parses the field.
 *
 * @param <T> the generic type
 * @param input the input
 * @param extensionRegistry the extension registry
 * @param type the type
 * @param value the value
 * @return the t
 * @throws IOException Signals that an I/O exception has occurred.
 */
@SuppressWarnings("unchecked")
static <T> T parseField(CodedInputStream input, ExtensionRegistryLite extensionRegistry, WireFormat.FieldType type,
        T value) throws IOException {
    switch (type) {
        case MESSAGE:
            int length = input.readRawVarint32();
            final int oldLimit = input.pushLimit(length);
            Codec<? extends Object> codec = ProtobufProxy.create(value.getClass());
            T ret = (T) codec.decode(input.readRawBytes(length));
            input.popLimit(oldLimit);
            return ret;
        case ENUM:
            return (T) (java.lang.Integer) input.readEnum();
        case GROUP:
            throw new RuntimeException("Groups are not allowed in maps.");
        default:
            return (T) CodedConstant.readPrimitiveField(input, type, true);
    }
}
项目:grumble    文件:Mumble.java   
public Builder mergeFrom(
        CodedInputStream input,
        ExtensionRegistryLite extensionRegistry)
        throws IOException {
    MumbleProto.Mumble.Version parsedMessage = null;
    try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
    } catch (InvalidProtocolBufferException e) {
        parsedMessage = (MumbleProto.Mumble.Version) e.getUnfinishedMessage();
        throw e;
    } finally {
        if (parsedMessage != null) {
            mergeFrom(parsedMessage);
        }
    }
    return this;
}
项目:grumble    文件:Mumble.java   
public Builder mergeFrom(
        CodedInputStream input,
        ExtensionRegistryLite extensionRegistry)
        throws IOException {
    MumbleProto.Mumble.VoiceTarget.Target parsedMessage = null;
    try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
    } catch (InvalidProtocolBufferException e) {
        parsedMessage = (MumbleProto.Mumble.VoiceTarget.Target) e.getUnfinishedMessage();
        throw e;
    } finally {
        if (parsedMessage != null) {
            mergeFrom(parsedMessage);
        }
    }
    return this;
}
项目:grumble    文件:Mumble.java   
public Builder mergeFrom(
        CodedInputStream input,
        ExtensionRegistryLite extensionRegistry)
        throws IOException {
    MumbleProto.Mumble.Ping parsedMessage = null;
    try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
    } catch (InvalidProtocolBufferException e) {
        parsedMessage = (MumbleProto.Mumble.Ping) e.getUnfinishedMessage();
        throw e;
    } finally {
        if (parsedMessage != null) {
            mergeFrom(parsedMessage);
        }
    }
    return this;
}
项目:grumble    文件:Mumble.java   
public Builder mergeFrom(
        CodedInputStream input,
        ExtensionRegistryLite extensionRegistry)
        throws IOException {
    MumbleProto.Mumble.UserStats.Stats parsedMessage = null;
    try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
    } catch (InvalidProtocolBufferException e) {
        parsedMessage = (MumbleProto.Mumble.UserStats.Stats) e.getUnfinishedMessage();
        throw e;
    } finally {
        if (parsedMessage != null) {
            mergeFrom(parsedMessage);
        }
    }
    return this;
}
项目:grumble    文件:Mumble.java   
public Builder mergeFrom(
        CodedInputStream input,
        ExtensionRegistryLite extensionRegistry)
        throws IOException {
    MumbleProto.Mumble.Reject parsedMessage = null;
    try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
    } catch (InvalidProtocolBufferException e) {
        parsedMessage = (MumbleProto.Mumble.Reject) e.getUnfinishedMessage();
        throw e;
    } finally {
        if (parsedMessage != null) {
            mergeFrom(parsedMessage);
        }
    }
    return this;
}
项目:grumble    文件:Mumble.java   
public Builder mergeFrom(
        CodedInputStream input,
        ExtensionRegistryLite extensionRegistry)
        throws IOException {
    MumbleProto.Mumble.ServerConfig parsedMessage = null;
    try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
    } catch (InvalidProtocolBufferException e) {
        parsedMessage = (MumbleProto.Mumble.ServerConfig) e.getUnfinishedMessage();
        throw e;
    } finally {
        if (parsedMessage != null) {
            mergeFrom(parsedMessage);
        }
    }
    return this;
}
项目:grumble    文件:Mumble.java   
public Builder mergeFrom(
        CodedInputStream input,
        ExtensionRegistryLite extensionRegistry)
        throws IOException {
    MumbleProto.Mumble.QueryUsers parsedMessage = null;
    try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
    } catch (InvalidProtocolBufferException e) {
        parsedMessage = (MumbleProto.Mumble.QueryUsers) e.getUnfinishedMessage();
        throw e;
    } finally {
        if (parsedMessage != null) {
            mergeFrom(parsedMessage);
        }
    }
    return this;
}
项目:grumble    文件:Mumble.java   
public Builder mergeFrom(
        CodedInputStream input,
        ExtensionRegistryLite extensionRegistry)
        throws IOException {
    MumbleProto.Mumble.ChannelRemove parsedMessage = null;
    try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
    } catch (InvalidProtocolBufferException e) {
        parsedMessage = (MumbleProto.Mumble.ChannelRemove) e.getUnfinishedMessage();
        throw e;
    } finally {
        if (parsedMessage != null) {
            mergeFrom(parsedMessage);
        }
    }
    return this;
}
项目:grumble    文件:Mumble.java   
public Builder mergeFrom(
        CodedInputStream input,
        ExtensionRegistryLite extensionRegistry)
        throws IOException {
    MumbleProto.Mumble.ChannelState parsedMessage = null;
    try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
    } catch (InvalidProtocolBufferException e) {
        parsedMessage = (MumbleProto.Mumble.ChannelState) e.getUnfinishedMessage();
        throw e;
    } finally {
        if (parsedMessage != null) {
            mergeFrom(parsedMessage);
        }
    }
    return this;
}
项目:grumble    文件:Mumble.java   
public Builder mergeFrom(
        CodedInputStream input,
        ExtensionRegistryLite extensionRegistry)
        throws IOException {
    MumbleProto.Mumble.UserList parsedMessage = null;
    try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
    } catch (InvalidProtocolBufferException e) {
        parsedMessage = (MumbleProto.Mumble.UserList) e.getUnfinishedMessage();
        throw e;
    } finally {
        if (parsedMessage != null) {
            mergeFrom(parsedMessage);
        }
    }
    return this;
}
项目:grumble    文件:Mumble.java   
public Builder mergeFrom(
        CodedInputStream input,
        ExtensionRegistryLite extensionRegistry)
        throws IOException {
    MumbleProto.Mumble.UserRemove parsedMessage = null;
    try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
    } catch (InvalidProtocolBufferException e) {
        parsedMessage = (MumbleProto.Mumble.UserRemove) e.getUnfinishedMessage();
        throw e;
    } finally {
        if (parsedMessage != null) {
            mergeFrom(parsedMessage);
        }
    }
    return this;
}
项目:grumble    文件:Mumble.java   
public Builder mergeFrom(
        CodedInputStream input,
        ExtensionRegistryLite extensionRegistry)
        throws IOException {
    MumbleProto.Mumble.ContextActionModify parsedMessage = null;
    try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
    } catch (InvalidProtocolBufferException e) {
        parsedMessage = (MumbleProto.Mumble.ContextActionModify) e.getUnfinishedMessage();
        throw e;
    } finally {
        if (parsedMessage != null) {
            mergeFrom(parsedMessage);
        }
    }
    return this;
}
项目:grumble    文件:Mumble.java   
public Builder mergeFrom(
        CodedInputStream input,
        ExtensionRegistryLite extensionRegistry)
        throws IOException {
    MumbleProto.Mumble.ACL.ChanGroup parsedMessage = null;
    try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
    } catch (InvalidProtocolBufferException e) {
        parsedMessage = (MumbleProto.Mumble.ACL.ChanGroup) e.getUnfinishedMessage();
        throw e;
    } finally {
        if (parsedMessage != null) {
            mergeFrom(parsedMessage);
        }
    }
    return this;
}
项目:grumble    文件:Mumble.java   
public Builder mergeFrom(
        CodedInputStream input,
        ExtensionRegistryLite extensionRegistry)
        throws IOException {
    MumbleProto.Mumble.UserState parsedMessage = null;
    try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
    } catch (InvalidProtocolBufferException e) {
        parsedMessage = (MumbleProto.Mumble.UserState) e.getUnfinishedMessage();
        throw e;
    } finally {
        if (parsedMessage != null) {
            mergeFrom(parsedMessage);
        }
    }
    return this;
}
项目:grumble    文件:Mumble.java   
public Builder mergeFrom(
        CodedInputStream input,
        ExtensionRegistryLite extensionRegistry)
        throws IOException {
    MumbleProto.Mumble.UserStats parsedMessage = null;
    try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
    } catch (InvalidProtocolBufferException e) {
        parsedMessage = (MumbleProto.Mumble.UserStats) e.getUnfinishedMessage();
        throw e;
    } finally {
        if (parsedMessage != null) {
            mergeFrom(parsedMessage);
        }
    }
    return this;
}
项目:grumble    文件:Mumble.java   
public Builder mergeFrom(
        CodedInputStream input,
        ExtensionRegistryLite extensionRegistry)
        throws IOException {
    MumbleProto.Mumble.BanList parsedMessage = null;
    try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
    } catch (InvalidProtocolBufferException e) {
        parsedMessage = (MumbleProto.Mumble.BanList) e.getUnfinishedMessage();
        throw e;
    } finally {
        if (parsedMessage != null) {
            mergeFrom(parsedMessage);
        }
    }
    return this;
}
项目:grumble    文件:Mumble.java   
public Builder mergeFrom(
        CodedInputStream input,
        ExtensionRegistryLite extensionRegistry)
        throws IOException {
    MumbleProto.Mumble.CryptSetup parsedMessage = null;
    try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
    } catch (InvalidProtocolBufferException e) {
        parsedMessage = (MumbleProto.Mumble.CryptSetup) e.getUnfinishedMessage();
        throw e;
    } finally {
        if (parsedMessage != null) {
            mergeFrom(parsedMessage);
        }
    }
    return this;
}
项目:grumble    文件:Mumble.java   
public Builder mergeFrom(
        CodedInputStream input,
        ExtensionRegistryLite extensionRegistry)
        throws IOException {
    MumbleProto.Mumble.ACL parsedMessage = null;
    try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
    } catch (InvalidProtocolBufferException e) {
        parsedMessage = (MumbleProto.Mumble.ACL) e.getUnfinishedMessage();
        throw e;
    } finally {
        if (parsedMessage != null) {
            mergeFrom(parsedMessage);
        }
    }
    return this;
}
项目:wecard-server    文件:ProtobufDecoder.java   
public ProtobufDecoder(MessageLite prototype, ExtensionRegistryLite extensionRegistry) {
    if (prototype == null) {
        throw new NullPointerException("prototype");
    }
    this.prototype = prototype.getDefaultInstanceForType();
    this.extensionRegistry = extensionRegistry;
}
项目:polyglot    文件:DynamicMessageMarshaller.java   
@Override
public DynamicMessage parse(InputStream inputStream) {
  try {
    return DynamicMessage.newBuilder(messageDescriptor)
        .mergeFrom(inputStream, ExtensionRegistryLite.getEmptyRegistry())
        .build();
  } catch (IOException e) {
    throw new RuntimeException("Unable to merge from the supplied input stream", e);
  }
}
项目:incubator-pulsar    文件:ByteBufCodedInputStream.java   
/** Read an embedded message field value from the stream. */
public void readMessage(final ByteBufMessageBuilder builder, final ExtensionRegistryLite extensionRegistry)
        throws IOException {
    final int length = readRawVarint32();

    int writerIdx = buf.writerIndex();
    buf.writerIndex(buf.readerIndex() + length);
    builder.mergeFrom(this, extensionRegistry);
    checkLastTagWas(0);
    buf.writerIndex(writerIdx);
}
项目:bdclient    文件:ProtobufLiteDecoder.java   
public ProtobufLiteDecoder(MessageLite prototype, ExtensionRegistryLite extensionRegistry)
{
    if (prototype == null)
    {
        throw new NullPointerException("prototype");
    }
    this.prototype = prototype.getDefaultInstanceForType();
    this.extensionRegistry = extensionRegistry;
}
项目:netty4.0.27Learn    文件:ProtobufDecoder.java   
public ProtobufDecoder(MessageLite prototype, ExtensionRegistryLite extensionRegistry) {
    if (prototype == null) {
        throw new NullPointerException("prototype");
    }
    this.prototype = prototype.getDefaultInstanceForType();
    this.extensionRegistry = extensionRegistry;
}
项目:TextSecureSMP    文件:PushSMPMessageProtos.java   
private SyncMessageContext(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException {
    this.memoizedIsInitialized = -1;
    this.memoizedSerializedSize = -1;
    this.initFields();
    boolean mutable_bitField0_ = false;
    com.google.protobuf.UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder();

    try {
        boolean e = false;

        while(!e) {
            int tag = input.readTag();
            switch(tag) {
                case 0:
                    e = true;
                    break;
                case 10:
                    this.bitField0_ |= 1;
                    this.destination_ = input.readBytes();
                    break;
                case 16:
                    this.bitField0_ |= 2;
                    this.timestamp_ = input.readUInt64();
                    break;
                default:
                    if(!this.parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
                        e = true;
                    }
            }
        }
    } catch (InvalidProtocolBufferException var11) {
        throw var11.setUnfinishedMessage(this);
    } catch (IOException var12) {
        throw (new InvalidProtocolBufferException(var12.getMessage())).setUnfinishedMessage(this);
    } finally {
        this.unknownFields = unknownFields.build();
        this.makeExtensionsImmutable();
    }

}
项目:infoserver    文件:ProtobufLiteDecoder.java   
public ProtobufLiteDecoder(MessageLite prototype, ExtensionRegistryLite extensionRegistry)
{
    if (prototype == null)
    {
        throw new NullPointerException("prototype");
    }
    this.prototype = prototype.getDefaultInstanceForType();
    this.extensionRegistry = extensionRegistry;
}
项目:springJredisCache    文件:JRedisSerializationUtils.java   
/**
 * @param bytes       字节数据
 * @param messageLite 序列化对应的类型
 * @return
 * @throws JRedisCacheException
 */
public static MessageLite protoDeserialize(byte[] bytes, MessageLite messageLite) throws JRedisCacheException {
    assert (bytes != null && messageLite != null);
    try {
        return messageLite.getParserForType().parsePartialFrom(CodedInputStream.newInstance(bytes), ExtensionRegistryLite.getEmptyRegistry());
    } catch (InvalidProtocolBufferException e) {
        e.printStackTrace();
        return null;
    }
}
项目:jprotobuf    文件:MapEntryLite.java   
/**
 * Parses an entry off of the input into the map. This helper avoids allocaton of a {@link MapEntryLite} by parsing
 * directly into the provided {@link MapFieldLite}.
 *
 * @param map the map
 * @param input the input
 * @param extensionRegistry the extension registry
 * @throws IOException Signals that an I/O exception has occurred.
 */
public void parseInto(MapFieldLite<K, V> map, CodedInputStream input, ExtensionRegistryLite extensionRegistry)
        throws IOException {
    int length = input.readRawVarint32();
    final int oldLimit = input.pushLimit(length);
    K key = metadata.defaultKey;
    V value = metadata.defaultValue;

    while (true) {
        int tag = input.readTag();
        if (tag == 0) {
            break;
        }
        if (tag == CodedConstant.makeTag(KEY_FIELD_NUMBER, metadata.keyType.getWireType())) {
            key = parseField(input, extensionRegistry, metadata.keyType, key);
        } else if (tag == CodedConstant.makeTag(VALUE_FIELD_NUMBER, metadata.valueType.getWireType())) {
            value = parseField(input, extensionRegistry, metadata.valueType, value);
        } else {
            if (!input.skipField(tag)) {
                break;
            }
        }
    }

    input.checkLastTagWas(0);
    input.popLimit(oldLimit);
    map.put(key, value);
}
项目:jprotobuf    文件:MapEntry.java   
/**
 * Instantiates a new metadata.
 *
 * @param descriptor the descriptor
 * @param defaultInstance the default instance
 * @param keyType the key type
 * @param valueType the value type
 */
public Metadata(Descriptor descriptor, MapEntry<K, V> defaultInstance, WireFormat.FieldType keyType,
        WireFormat.FieldType valueType) {
    super(keyType, defaultInstance.key, valueType, defaultInstance.value);
    this.descriptor = descriptor;
    this.parser = new AbstractParser<MapEntry<K, V>>() {

        @Override
        public MapEntry<K, V> parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
                throws InvalidProtocolBufferException {
            return new MapEntry<K, V>(Metadata.this, input, extensionRegistry);
        }
    };
}
项目:bazel    文件:Marshallers.java   
@Override
public void addDeserializationCode(Context context) {
  String builderName = context.makeName("builder");
  context.builder.addStatement(
      "$T.Builder $L = $T.newBuilder()",
      context.getTypeName(),
      builderName,
      context.getTypeName());
  context.builder.addStatement(
      "codedIn.readMessage($L, $T.getEmptyRegistry())",
      builderName,
      ExtensionRegistryLite.class);
  context.builder.addStatement("$L = $L.build()", context.name, builderName);
}
项目:wecard-server    文件:ProtobufDecoder.java   
public ProtobufDecoder(MessageLite prototype, ExtensionRegistry extensionRegistry) {
    this(prototype, (ExtensionRegistryLite) extensionRegistry);
}
项目:GitHub    文件:ProtoResponseBodyConverter.java   
ProtoResponseBodyConverter(Parser<T> parser, ExtensionRegistryLite registry) {
  this.parser = parser;
  this.registry = registry;
}
项目:GitHub    文件:ProtoConverterFactory.java   
/** Create an instance which uses {@code registry} when deserializing. */
public static ProtoConverterFactory createWithRegistry(ExtensionRegistryLite registry) {
  return new ProtoConverterFactory(registry);
}
项目:GitHub    文件:ProtoConverterFactory.java   
private ProtoConverterFactory(ExtensionRegistryLite registry) {
  this.registry = registry;
}
项目:GitHub    文件:ProtoResponseBodyConverter.java   
ProtoResponseBodyConverter(Parser<T> parser, @Nullable ExtensionRegistryLite registry) {
  this.parser = parser;
  this.registry = registry;
}