Example usage for java.net URLConnection getHeaderFieldLong

List of usage examples for java.net URLConnection getHeaderFieldLong

Introduction

In this page you can find the example usage for java.net URLConnection getHeaderFieldLong.

Prototype

public long getHeaderFieldLong(String name, long Default) 

Source Link

Document

Returns the value of the named field parsed as a number.

Usage

From source file:Main.java

public static void main(String args[]) throws Exception {
    URL url = new URL("http://www.google.com");
    URLConnection httpCon = (URLConnection) url.openConnection();

    long s = httpCon.getHeaderFieldLong("longKey", 1L);

}