I am doing a project in java in eclipse GA 3.4.2 . I have to upload the file and encrypt the file content in one class and then send the encrypted file contents to other class. For this to occur I have copied the encrypted contents into a string object and then send it to other class and then store it into the database. Here, I have encounterred a problem that when the encrypted content is stored in the string object, the object is not able to recognize some of the encrypted characters in the content, which I 'm able to recognize by the syso stmts. So, in the process of download, when I retrieve that content from database and try to decrypt it, it doesn't matche the original file content.
So, could you please give solution without using the string object in the process and whether the filecontents could be transferred without using the string object format between classes?