code: public static <B extends Buffer> Output<B> fromSource(
              ManagedBuffer<B> buffer, boolean endOfRecord) {
          return new Output<>(buffer, false, endOfRecord);
      }
docs: Create a new event with the given buffer. The buffer must
  have been prepared for invoking `get`-methods.
  
  @param buffer the buffer with the data
  @param endOfRecord if the event ends a data record