public static final boolean isASCII(File file) throws IOException, StlParseException {
  if (file.exists())   throw new StlParseException("Passed file does not exist.");
  if (!file.isFile())   throw new StlParseException("This is not a file.");
  final BufferedReader buffer=new BufferedReader(new FileReader(file));
  boolean isASCII=isASCII(buffer);
  buffer.close();
  return isASCII;
}

public static final boolean isASCII ( File file ) throws IOException , StlParseException { if ( file . exists ( ) ) throw new StlParseException ( "Passed file does not exist." ) ; if ( ! file . isFile ( ) ) throw new StlParseException ( "This is not a file." ) ; final BufferedReader buffer = new BufferedReader ( new FileReader ( file ) ) ; boolean isASCII = isASCII ( buffer ) ; buffer . close ( ) ; return isASCII ; }
determine if a given file appears to be in ascii format .
