I am copy few file to one location...file size is 25 bytes after copy this file,bytes value changed.after copy that file size is 102 bytes. Please tell me how to avoid this error..i want original size only...
It's possible that you're doing a text file copy under Windows of a text file that was created in Unix. That would increase the size, size Unix considers a single end-of-line character to be a sufficient indicator, but DOS/Windows uses 2.
Although that's an awful lot of end-of-lines, if that's the case.
Since the files are small, compare them and see what's different.
An IDE is no substitute for an Intelligent Developer.
Joined: Oct 12, 2009
that file is like header file..& i hope that file created in Window only...
& also while generate ear file or war file im include this file also...that time only i getting this size increase issue...
sorry for previously i mentioned while copy only i got this issue...
real issue...while generate war/ear file i am getting size increase issue...
25 bytes to 102 bytes? Sounds like a conversion from ASCII to 4-byte Unicode, with a 2-byte byte-order-marker at the start of the file. If you have a hex editor, you can use it to verify this. This is probably happening because of the locale settings in your computer. I suspect that such settings can be changed on the JVM command line (you will have to edit ant.bat to apply them), but I don't know what they are.
See the "Important Encoding Note:" at the end of the copy task in the ant docs.