public static void main(String[] args) throws Exception {
FitsFactory.setUseHierarch(true);
Fits f = new Fits(args[0]);
BasicHDU h = f.readHDU();
Header hdr = h.getHeader();
Cursor c = hdr.iterator();
while (c.hasNext()) {
HeaderCard hc = (HeaderCard) c.next();
System.out.print("Key= " + hc.getKey() + " ");