public static void writeElement ( final CodedOutputStream output , final WireFormat . FieldType type , final int number , final Object value ) throws IOException { // Special case for groups, which need a start and end tag; other fields // can just use writeTag() and writeFieldNoTag(). if ( type == WireFormat . FieldType . GROUP ) { output . writeGroup ( number , ( MessageLite ) value ) ; } else { output . writeTag ( number , getWireFormatForFieldType ( type , false ) ) ; writeElementNoTag ( output , type , value ) ; } }
Write a single tag - value pair to the stream .