com.sonalb.net.http
Class HeaderUtils
java.lang.Object
|
+--com.sonalb.net.http.HeaderUtils
- public final class HeaderUtils
- extends Object
Utility class with methods relevant to HTTP Headers.
- Author:
- Sonal Bansal
extractHeaders
public static Header extractHeaders(URLConnection uc)
- Extracts the headers from the input URLConnection, and populates them in a Header instance.
- Parameters:
uc
- a connected URLConnection- Returns:
- the Header; always non-null
setHeaders
public static void setHeaders(URLConnection uc,
Header h)
- Converts the Header input, into properties in the URLConnection.
- Parameters:
uc
- an un-connected URLConnectionh
- a Header