Esempio n. 1
0
 public static void printResponseHeader(HttpURLConnection h) {
   if (h == null) return;
   List<DataVal> list = getConnectionHeader(h);
   if (list != null) {
     for (DataVal x : list) {
       System.out.println(x.toString());
     }
   }
 }
Esempio n. 2
0
 public static String getResponseHeader(HttpURLConnection h, String name) {
   if (h != null && name != null) {
     List<DataVal> pData = getConnectionHeader(h);
     if (pData != null) {
       for (DataVal x : pData) {
         if (name.equals(x.getName())) return x.getData().toString();
       }
     }
   }
   return null;
 }