Exportdisplay (download) a poi created excel file

For a POI workbook I created in cuba, i want to download it using ExportDisplay. But I don’t see FileOutputStream in Cuba. How would I do this?

SomeServicemethod(String somefileName) {
. . .
try (FileOutputStream outputStream = new FileOutputStream(new File(somefileName))) {
                workbook.write(outputStream);
                outputStream.flush();
 }

SomeScreen
    @Inject
    private ExportDisplay exportDisplay;

OnSomeEvent(){
      SomeServicemethod("somefileName.xlsx");
        byte[] bytes;
        try {
            bytes = html.getBytes("UTF-8");
        } catch (UnsupportedEncodingException e) {
            throw new RuntimeException(e);
        }
      exportDisplay.show(new ByteArrayDataProvider(bytes), "somefileName.xlsx", ExportFormat.XLSX);
}

Hello @fredzim1

Could you clarify where the workbook is located? I mean what source is used to read it.

Regards