I have some files which will be either email attachments or zip attachments. which means that I have stream of the file instead of file or its actual path. I need to get the created date time and last modified date time of the file using the InputStream of the file. I tried Metadata from apache tika, It's not giving me these two things, however I can see these two properties in the file properties. Also I'm able to get the created date time and modified date time of the same files using BasicFileAttribute. But the BasicFileAttribute will work on the file path and won't work with the stream of the file. consider the scenario below -
I have a file say myTestFile.txt for this file, I can see the createdDateTime and modifiedDateTime in the file properties. and I'm able to get these two data using BasicFileAttribute. But for the same file, when I'm using Apache tike Metadata to parse with the stream of the file to get the createdDateTime and lastmodifiedDateTime, It's not giving me any of the two dates.
I need to get the solution for createdDateTime and lastModifiedDateTime with the stream instead of the file or filepath because in the production environment, I'll only have the stream and not the actual file or the file path.
Thanks