Reputation: 983
The idea is to encrypt a jar file, actually to encode it inorder to make it impossible to open with zip utility software (eg: winzip, winrar or ...).
For encoding the jar file, i have just increment every byte of jar file for test purpose. then i want to read the encoded jar file as ZipFile to work with its data like a real jar file.
Now the problems is that when i initialize a ZipFile, it needs an reference of file, which the ZipFile class always consider that the file is a Zip file; but actually it is not.
i want to change the read(...) method of ZipFile or any other method that deals with the input stream, to perform the decoding while reading the data from stream.
if any body can help with this solution or have any suggestion please tell me.
Upvotes: 0
Views: 74
Reputation: 594
you could use the stream version of ZipFile
, ZipInpuStream
. it does not care the stream you supplied is modified or not.
Upvotes: 0