Hi Arun,
The file document could very well be assigned to IMendixObject.
When looking at your java code, you are using Core.getFileDocumentContent which returns InputStream
To use this method, you must already pass the FileDocument as IMendixObject.
Why not retrieve the file document in the microflow where you are calling the Java action and pass it on to this java action as a Parameter.
Or you could use system.proxies.FileDocument.load method if you knew the IMendixIdentifier.
If you are looking for example Java code for working with FileDocuments, the code for the excellent Community Commons module is on GitHub.
https://github.com/mendix/CommunityCommons
Have a look at the code for StringFromFile, StringToFile, FileDocumentFromFile, FileFromFileDocument, amongst others.
Hope this helps.