static protected <T extends BaseMessage> T readGroup(CodedInputStream input, int tag, T group) throws IOException { group.mergeUnframed(input); input.checkLastTagWas(makeTag(tag, WIRETYPE_END_GROUP)); return group; }
static protected <T extends BaseMessage> T readGroup(CodedInputStream input, int tag, T group) throws IOException { group.mergeUnframed(input); input.checkLastTagWas(makeTag(tag, WIRETYPE_END_GROUP)); return group; }
static protected <T extends BaseMessage> T readGroup(CodedInputStream input, int tag, T group) throws IOException { group.mergeUnframed(input); input.checkLastTagWas(makeTag(tag, WIRETYPE_END_GROUP)); return group; }
public T mergeFramed(Buffer data) throws InvalidProtocolBufferException { try { CodedInputStream input = new CodedInputStream(data); mergeFramed(input); input.checkLastTagWas(0); return getThis(); } catch (InvalidProtocolBufferException e) { throw e; } catch (IOException e) { throw new RuntimeException("An IOException was thrown (should never happen in this method).", e); } }
public T mergeFramed(Buffer data) throws InvalidProtocolBufferException { try { CodedInputStream input = new CodedInputStream(data); mergeFramed(input); input.checkLastTagWas(0); return getThis(); } catch (InvalidProtocolBufferException e) { throw e; } catch (IOException e) { throw new RuntimeException("An IOException was thrown (should never happen in this method).", e); } }
public T mergeUnframed(Buffer data) throws InvalidProtocolBufferException { try { CodedInputStream input = new CodedInputStream(data); mergeUnframed(input); input.checkLastTagWas(0); return getThis(); } catch (InvalidProtocolBufferException e) { throw e; } catch (IOException e) { throw new RuntimeException("An IOException was thrown (should never happen in this method).", e); } }
public T mergeUnframed(Buffer data) throws InvalidProtocolBufferException { try { CodedInputStream input = new CodedInputStream(data); mergeUnframed(input); input.checkLastTagWas(0); return getThis(); } catch (InvalidProtocolBufferException e) { throw e; } catch (IOException e) { throw new RuntimeException("An IOException was thrown (should never happen in this method).", e); } }
public T mergeFramed(Buffer data) throws InvalidProtocolBufferException { try { CodedInputStream input = new CodedInputStream(data); mergeFramed(input); input.checkLastTagWas(0); return getThis(); } catch (InvalidProtocolBufferException e) { throw e; } catch (IOException e) { throw new RuntimeException("An IOException was thrown (should never happen in this method).", e); } }
public T mergeUnframed(Buffer data) throws InvalidProtocolBufferException { try { CodedInputStream input = new CodedInputStream(data); mergeUnframed(input); input.checkLastTagWas(0); return getThis(); } catch (InvalidProtocolBufferException e) { throw e; } catch (IOException e) { throw new RuntimeException("An IOException was thrown (should never happen in this method).", e); } }
protected void load() { if (!decoded) { decoded = true; try { Buffer originalForm = encodedForm; encodedForm=null; CodedInputStream input = new CodedInputStream(originalForm); mergeUnframed(input); input.checkLastTagWas(0); // We need to reset the encoded form because the mergeUnframed // from a stream clears it out. encodedForm = originalForm; checktInitialized(); } catch (Throwable e) { throw new RuntimeException("Deferred message decoding failed: " + e.getMessage(), e); } } }
protected void load() { if (!decoded) { decoded = true; try { Buffer originalForm = encodedForm; encodedForm=null; CodedInputStream input = new CodedInputStream(originalForm); mergeUnframed(input); input.checkLastTagWas(0); // We need to reset the encoded form because the mergeUnframed // from a stream clears it out. encodedForm = originalForm; checktInitialized(); } catch (Throwable e) { throw new RuntimeException("Deferred message decoding failed: " + e.getMessage(), e); } } }
protected void load() { if (!decoded) { decoded = true; try { Buffer originalForm = encodedForm; encodedForm=null; CodedInputStream input = new CodedInputStream(originalForm); mergeUnframed(input); input.checkLastTagWas(0); // We need to reset the encoded form because the mergeUnframed // from a stream clears it out. encodedForm = originalForm; checktInitialized(); } catch (Throwable e) { throw new RuntimeException("Deferred message decoding failed: " + e.getMessage(), e); } } }
public T mergeFramed(CodedInputStream input) throws IOException { int length = input.readRawVarint32(); int oldLimit = input.pushLimit(length); T rc = mergeUnframed(input); input.checkLastTagWas(0); input.popLimit(oldLimit); return rc; }
public T mergeFramed(CodedInputStream input) throws IOException { int length = input.readRawVarint32(); int oldLimit = input.pushLimit(length); T rc = mergeUnframed(input); input.checkLastTagWas(0); input.popLimit(oldLimit); return rc; }
public T mergeFramed(CodedInputStream input) throws IOException { int length = input.readRawVarint32(); int oldLimit = input.pushLimit(length); T rc = mergeUnframed(input); input.checkLastTagWas(0); input.popLimit(oldLimit); return rc; }
/** * Reads and discards a single field, given its tag value. * * @return {@code false} if the tag is an endgroup tag, in which case * nothing is skipped. Otherwise, returns {@code true}. */ public boolean skipField(int tag) throws IOException { switch (WireFormat.getTagWireType(tag)) { case WireFormat.WIRETYPE_VARINT: readInt32(); return true; case WireFormat.WIRETYPE_FIXED64: readRawLittleEndian64(); return true; case WireFormat.WIRETYPE_LENGTH_DELIMITED: skipRawBytes(readRawVarint32()); return true; case WireFormat.WIRETYPE_START_GROUP: skipMessage(); checkLastTagWas(WireFormat.makeTag(WireFormat.getTagFieldNumber(tag), WireFormat.WIRETYPE_END_GROUP)); return true; case WireFormat.WIRETYPE_END_GROUP: return false; case WireFormat.WIRETYPE_FIXED32: readRawLittleEndian32(); return true; default: throw InvalidProtocolBufferException.invalidWireType(); } }
/** * Reads and discards a single field, given its tag value. * * @return {@code false} if the tag is an endgroup tag, in which case * nothing is skipped. Otherwise, returns {@code true}. */ public boolean skipField(int tag) throws IOException { switch (WireFormat.getTagWireType(tag)) { case WireFormat.WIRETYPE_VARINT: readInt32(); return true; case WireFormat.WIRETYPE_FIXED64: readRawLittleEndian64(); return true; case WireFormat.WIRETYPE_LENGTH_DELIMITED: skipRawBytes(readRawVarint32()); return true; case WireFormat.WIRETYPE_START_GROUP: skipMessage(); checkLastTagWas(WireFormat.makeTag(WireFormat.getTagFieldNumber(tag), WireFormat.WIRETYPE_END_GROUP)); return true; case WireFormat.WIRETYPE_END_GROUP: return false; case WireFormat.WIRETYPE_FIXED32: readRawLittleEndian32(); return true; default: throw InvalidProtocolBufferException.invalidWireType(); } }
/** * Reads and discards a single field, given its tag value. * * @return {@code false} if the tag is an endgroup tag, in which case * nothing is skipped. Otherwise, returns {@code true}. */ public boolean skipField(int tag) throws IOException { switch (WireFormat.getTagWireType(tag)) { case WireFormat.WIRETYPE_VARINT: readInt32(); return true; case WireFormat.WIRETYPE_FIXED64: readRawLittleEndian64(); return true; case WireFormat.WIRETYPE_LENGTH_DELIMITED: skipRawBytes(readRawVarint32()); return true; case WireFormat.WIRETYPE_START_GROUP: skipMessage(); checkLastTagWas(WireFormat.makeTag(WireFormat.getTagFieldNumber(tag), WireFormat.WIRETYPE_END_GROUP)); return true; case WireFormat.WIRETYPE_END_GROUP: return false; case WireFormat.WIRETYPE_FIXED32: readRawLittleEndian32(); return true; default: throw InvalidProtocolBufferException.invalidWireType(); } }