@Override public BuilderType mergeFrom(final CodedInputStream input) throws IOException { return mergeFrom(input, ExtensionRegistry.getEmptyRegistry()); }
/** * Parse a text-format message from {@code input} and merge the contents * into {@code builder}. */ public static void merge(final Readable input, final Message.Builder builder) throws IOException { merge(input, ExtensionRegistry.getEmptyRegistry(), builder); }
@Override public BuilderType mergeFrom(final CodedInputStream input) throws IOException { return mergeFrom(input, ExtensionRegistry.getEmptyRegistry()); }
/** * Parse a text-format message from {@code input} and merge the contents * into {@code builder}. */ public void merge(final Readable input, final Message.Builder builder) throws IOException { merge(input, ExtensionRegistry.getEmptyRegistry(), builder); }
/** * Parse a text-format message from {@code input} and merge the contents * into {@code builder}. Extensions will be recognized if they are * registered in {@code extensionRegistry}. */ public void merge(final Readable input, final ExtensionRegistry extensionRegistry, final Message.Builder builder) throws IOException { // Read the entire input to a String then parse that. // If StreamTokenizer were not quite so crippled, or if there were a kind // of Reader that could read in chunks that match some particular regex, // or if we wanted to write a custom Reader to tokenize our stream, then // we would not have to read to one big String. Alas, none of these is // the case. Oh well. merge(toStringBuilder(input), extensionRegistry, builder); }
/** * Parse a text-format message from {@code input} and merge the contents * into {@code builder}. Extensions will be recognized if they are * registered in {@code extensionRegistry}. */ public static void merge(final Readable input, final ExtensionRegistry extensionRegistry, final Message.Builder builder) throws IOException { // Read the entire input to a String then parse that. // If StreamTokenizer were not quite so crippled, or if there were a kind // of Reader that could read in chunks that match some particular regex, // or if we wanted to write a custom Reader to tokenize our stream, then // we would not have to read to one big String. Alas, none of these is // the case. Oh well. merge(toStringBuilder(input), extensionRegistry, builder); }
final Builder subBuilder = newBuilder(); input.readGroup(number, subBuilder, ExtensionRegistry.getEmptyRegistry()); getFieldBuilder(number).addGroup(subBuilder.build()); return true;
final Builder subBuilder = newBuilder(); input.readGroup(number, subBuilder, ExtensionRegistry.getEmptyRegistry()); getFieldBuilder(number).addGroup(subBuilder.build()); return true;
/** * Parse a text-format message from {@code input} and merge the contents into {@code builder}. */ public static void merge(Readable input, Message.Builder builder) throws IOException { merge(input, ExtensionRegistry.getEmptyRegistry(), builder); }
/** * Parse a text-format message from {@code input} and merge the contents into {@code builder}. */ public static void merge(CharSequence input, Message.Builder builder) throws ParseException { merge(input, ExtensionRegistry.getEmptyRegistry(), builder); }
/** * Parse a text-format message from {@code input} and merge the contents * into {@code builder}. */ public void merge(final InputStream input, Charset cs, final Message.Builder builder) throws IOException { merge(input, cs, ExtensionRegistry.getEmptyRegistry(), builder); }
@Override public BuilderType mergeFrom(final CodedInputStream input) throws IOException { return mergeFrom(input, ExtensionRegistry.getEmptyRegistry()); }
/** * Parse a text-format message from {@code input} and merge the contents into {@code builder}. */ public static void merge(Readable input, Message.Builder builder) throws IOException { merge(input, ExtensionRegistry.getEmptyRegistry(), builder); }
public void merge(final InputStream input, final Message.Builder builder) throws IOException { merge(input, defaultCharset, ExtensionRegistry.getEmptyRegistry(), builder); }
/** * Parse a text-format message from {@code input} and merge the contents * into {@code builder}. */ public void merge(final Readable input, final Message.Builder builder) throws IOException { merge(input, ExtensionRegistry.getEmptyRegistry(), builder); }
/** * Parse a text-format message from {@code input} and merge the contents * into {@code builder}. */ public void merge(final Readable input, final Message.Builder builder) throws IOException { merge(input, ExtensionRegistry.getEmptyRegistry(), builder); }
/** * Parse a text-format message from {@code input} and merge the contents * into {@code builder}. */ public void merge(final InputStream input, Charset cs, final Message.Builder builder) throws IOException { merge(input, cs, ExtensionRegistry.getEmptyRegistry(), builder); }
/** * Parse a text-format message from {@code input} and merge the contents * into {@code builder}. */ public void merge(final InputStream input, Charset cs, final Message.Builder builder) throws IOException { merge(input, cs, ExtensionRegistry.getEmptyRegistry(), builder); }
@Test public void testDurationIsNotProto2() { // Duration is a core Protocol Buffers type that uses proto3 syntax. thrown.expect(IllegalArgumentException.class); thrown.expectMessage(Duration.class.getCanonicalName()); thrown.expectMessage("in file " + Duration.getDescriptor().getFile().getName()); checkProto2Syntax(Duration.class, ExtensionRegistry.getEmptyRegistry()); }
@Test public void testAnyIsNotProto2() { // Any is a core Protocol Buffers type that uses proto3 syntax. thrown.expect(IllegalArgumentException.class); thrown.expectMessage(Any.class.getCanonicalName()); thrown.expectMessage("in file " + Any.getDescriptor().getFile().getName()); checkProto2Syntax(Any.class, ExtensionRegistry.getEmptyRegistry()); }