code: @Override
      public void onRequest()
      {
          final String fileName = getFileName();
          final IResourceStream stream = getResourceStream();
          final ResourceStreamRequestHandler handler = new ResourceStreamRequestHandler(stream, fileName);
          handler.setContentDisposition(ContentDisposition.ATTACHMENT);
          getComponent().getRequestCycle().scheduleRequestHandlerAfterCurrent(handler);
      }
docs: On request, respond with a ResourcStream.