• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

difference between ASCII and binary files

 
Gica Butoiu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I tell in Java if a file is ASCII (it contains only ASCII characters) or binary ? I mean is there another method without checking the entire content of the file ?
--gica
 
Fred Hosch
Author
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well, in the unix world there's a magic number at the start of
the file that you can check. (man magic). god only knows
what things look like in the devil's workshop.
------------------
Fred Hosch
Author of:
An Introduction to Software Construction with Java
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as I know there is no way to determine the encoding method used for a particular file.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic