• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java File Error - Format Issue  RSS feed

 
Ram Thota
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Below is the code I am using to copy a file from 1 place to another. The destination file is opening properly only in notepad. When i try to print the destn file contents, it is displaying some junk/control (some boxes) characters.

May be it is due to some byte/binary conversion problem.

Also, I need to read and replace few values according to business logic which is not happening due the above issue.

Please help.
------------------------------------------------------------------------------------------------------


JCE: please UseCodeTags
 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch.
Notepad does not handle non-Windows end-of-line characters. Try opening it in a "real" text editor.
 
Ram Thota
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to read replace some values in that text file, which i am not able to do..
please help
 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What have you tried so far? We are here to help, but we ask that you ShowSomeEffort.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!