Here you can find the source of getHeaderFieldLong(URLConnection conn, String name, long Default)
Parameter | Description |
---|---|
name | a parameter |
Default | a parameter |
public static long getHeaderFieldLong(URLConnection conn, String name, long Default)
//package com.java2s; //License from project: Creative Commons License import java.net.URLConnection; public class Main { /**//from ww w . j ava 2 s. c om * Java 7 method * * @param name * @param Default * @return */ public static long getHeaderFieldLong(URLConnection conn, String name, long Default) { String value = conn.getHeaderField(name); try { return Long.parseLong(value); } catch (Exception e) { } return Default; } }