URLConnection.getHeaderFieldInt

URLConnection.getHeaderFieldInt

Class Overview | Class Members | This Package | All Packages

Syntax
public int getHeaderFieldInt( String name, int Default )
Parameters
name
the name of the header field.
Default
the default value.
Returns
the value of the named field, parsed as an integer. The Default value is returned if the field is missing or malformed.
Description
Returns the value of the named field parsed as a number.

This form of getHeaderField exists because some connection types (e.g., http-ng) have pre-parsed headers. Classes for that connection type can override this method and short-circuit the parsing.