Thanks for your posting and using Aspose.Cells for Java.
Yes, it is quite possible to save your output stream into a memory stream. Aspose.Cells for Java saves your file in Stream and this Stream could be a file stream or memory stream as per user needs.
For example, the following code creates a workbook object, you can create it from your source/template file or you can create it from scratch with its default constructor, then you do whatever processing you like.
Finally, it saves the workbook object int csv format inside a memory using ByteArrayOutputStream object.
I have fully commented the code and you will not have any trouble understanding it. You can then modify this code as per your needs.