try {
URL u = new URL("http://www.sdexpo.com/");
URLConnection uc = u.openConnection();
uc.connect();
String key=null;
for (int n = 1;
key=uc.getHeaderFieldKey(n)) != null;
n++) {
System.out.println(key + ": " + uc.getHeaderField(key));
}
}
catch (IOException e) {
System.err.println(e);
}