Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 303
  • Last Modified:

How can I automatically tell the difference between a character file and a binary file in JAVA?

I am streaming a combination of character files and binary files into my Java application.  Is there an elegant way of determining if a file is either a binary file or a character file?  This way I can use a combination of FileInputStream and FileWriter.

Many thanks in advance

Steve.
0
Steve23
Asked:
Steve23
  • 2
1 Solution
 
Steve23Author Commented:
Doh! Never mind, figured out how to do this by mapping different directory paths to one directory. This created a kind of virtual directory structure.  This was all done on the FTP server.
0
 
RashimusCommented:
Pour some water over them,

The Character file will turn green, whilst the binary file will turn blue.

Maybe say a magic word or too..

Good luck...
0
 
Steve23Author Commented:
Ill try that!  Lucky thing that ive got my Harry Potter book of spells.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now