Modified Checksum for Files Stored through XADisk

26 views
Skip to first unread message

nektarios...@gmail.com

unread,
Nov 12, 2014, 3:46:22 AM11/12/14
to xad...@googlegroups.com
Hi,
I'm using XADisk to save uploaded files to filesystem in a transactional manner. Uploaded files can be up 2GB; so I use the heavyWrite option on the XAFileOutputStream.
Before writing a file to disk, I calucate its MD5 checksum (which is stored in a relational database). 
The problem is that the MD5 checksum of the actually written file to disk is different than the one calculated for the uploaded file. 
It seems that the saved file is somehow altered by the XADisk api. 
Any ideas will be highly appreciated..

Best regards,
Nektarios

Nitin Verma

unread,
Nov 14, 2014, 1:21:08 PM11/14/14
to xad...@googlegroups.com, nektarios...@gmail.com
Hi Nektarios,

The bytes which we write to the file using xadisk's output stream (with heavyWrite = true or false) are not altered in any way. You need to investigate for any other reason due to which the two set of byte sequences being compared (through their md5 checksum) are different. For making the testing simple, you can temporarily replace xadisk's file outputstream with the java's file output stream, and see if the difference continues.

Thanks,
Nitin

Reply all
Reply to author
Forward
0 new messages