parse

Parses the given timeout String and converts the timeout value
into a long indicating the number of milliseconds until expiration time
is reached.
NOTE: If the timeout String equals to 'infinite'Integer.MAX_VALUE is returned. If the Sting is invalid or is in an
invalid format that cannot be parsed, the default value is returned.

Parameters:

timeoutStr -

defaultValue -

Returns:

long representing the timeout present in the header or the default
value if the header is missing or could not be parsed.