@Test public void testEmpty() throws IOException { Marshaller<Empty> marshaller = ProtoLiteUtils.marshaller(Empty.getDefaultInstance()); InputStream is = marshaller.stream(Empty.getDefaultInstance()); assertEquals(0, is.available()); byte[] b = new byte[10]; assertEquals(-1, is.read(b)); assertArrayEquals(new byte[10], b); assertEquals(-1, is.read(b)); assertArrayEquals(new byte[10], b); assertEquals(-1, is.read()); assertEquals(0, is.available()); }
public static <T extends MessageLite> Marshaller<T> marshaller(T defaultInstance) { return new MessageMarshaller<T>(defaultInstance); }
ProtoLiteUtils { public static <T extends MessageLite> Marshaller<T> marshaller(T defaultInstance) { return new MessageMarshaller<T>(defaultInstance); } }
ProtoLiteUtils { public static <T extends MessageLite> Marshaller<T> marshaller(T defaultInstance) { return new MessageMarshaller<T>(defaultInstance); } private  ProtoLiteUtils(); }
ProtoLiteUtils { public static <T extends MessageLite> Marshaller<T> marshaller(T defaultInstance) { return new MessageMarshaller<T>(defaultInstance); } private  ProtoLiteUtils(); @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1787") static void setExtensionRegistry(ExtensionRegistryLite newRegistry); static Marshaller<T> marshaller(T defaultInstance); static Metadata.BinaryMarshaller<T> metadataMarshaller(
      T defaultInstance); }
ProtoLiteUtils { public static <T extends MessageLite> Marshaller<T> marshaller(T defaultInstance) { return new MessageMarshaller<T>(defaultInstance); } private  ProtoLiteUtils(); @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1787") static void setExtensionRegistry(ExtensionRegistryLite newRegistry); static Marshaller<T> marshaller(T defaultInstance); static Metadata.BinaryMarshaller<T> metadataMarshaller(
      T defaultInstance);  }