code: public static int writeTo(OutputStream out, Object message, Schema schema, 
              LinkedBuffer buffer) throws IOException
      {
          if(buffer.start != buffer.offset)
              throw new IllegalArgumentException("Buffer previously used and had not been reset.");
          
          final ProtobufOutput output = new ProtobufOutput(buffer);
          schema.writeTo(output, message);
          return LinkedBuffer.writeTo(out, buffer);
      }
docs: Serializes the {@code message} into an {@link OutputStream} using the given schema.
  
  @return the size of the message