How to Convert Mendix File object into file.txt in java action ?

2
I am passing File object ( i.e  text file )into Java action as a input parameter .  Now in Java action I want to read line by line characters ( from that text file ) and also want to perform some other actions on files In Java. How to Use that mendix file object  in java .    Microflow:  Java Parameter:               3. Java Action:      
asked
1 answers
4

If you want to read a FileDocument you need to use the method getFileDocumentContent from the Core API. This will give you an InputStream that you can then read from. For example...
 

InputStream f = Core.getFileDocumentContent(context, yourFileDocumentObject.getMendixObject());


Hope this helps.

answered