code: public void invokeHandler(OutputStream outputStream) throws IOException
    {
      @SuppressWarnings("unchecked")
      T t = OutputStream.class.equals(this.streamClass) ? (T)outputStream : Classes.newInstance(streamClass, outputStream);
      handle(t);
      t.flush();
      t.close();
    }
docs: Helper method used to invoke concrete output stream handler method. Please note that given output stream is closed
  after handler invocation, just before this method return.
  
  @param outputStream wrapped output stream instance.
  @throws IOException any output stream exception is bubbled up.