Java help

Discussion in 'Web Design & Coding' started by delta4s, Dec 3, 2004.

  1. delta4s

    delta4s BLACK HAWK ALOFT

    Messages:
    340
    Location:
    Bangalore, India
    How can I tell that a file is an ASCII text file in Java ( regardless of the file extension)
     
  2. Geffy

    Geffy Moderator Folding Team

    Messages:
    7,805
    Location:
    United Kingdom
    checking for a text/* mime type maybe

    it shouldnt really matter if its ASCII or Unicode though as Unicode uses the same decimal equivalents as ASCII just using two bytes rather than one to represent the character
     
    delta4s likes this.
  3. delta4s

    delta4s BLACK HAWK ALOFT

    Messages:
    340
    Location:
    Bangalore, India
    Thanks for the reply Geffy.How can I check the MIME or filetype header in Java. Do you know of a package that can help me do it ?
     
  4. Geffy

    Geffy Moderator Folding Team

    Messages:
    7,805
    Location:
    United Kingdom
  5. delta4s

    delta4s BLACK HAWK ALOFT

    Messages:
    340
    Location:
    Bangalore, India
    Thank You :)