de.nava.informa.utils
Class HttpHeaderUtils

java.lang.Object
  extended by de.nava.informa.utils.HttpHeaderUtils

public class HttpHeaderUtils
extends Object

utilities to deal with http headers

Author:
Jean-Guy Avelin

Constructor Summary
HttpHeaderUtils()
           
 
Method Summary
static String getETagValue(HttpURLConnection conn)
           
static long getLastModified(HttpURLConnection conn)
           
static void setETagValue(HttpURLConnection conn, String etag)
          do nothing if etag == null otherwise add a If-None-Match property in http header
static void setIfModifiedSince(HttpURLConnection conn, long value)
          add a if-modified-since property on http header.
static void setUserAgent(HttpURLConnection conn, String agent)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpHeaderUtils

public HttpHeaderUtils()
Method Detail

setIfModifiedSince

public static void setIfModifiedSince(HttpURLConnection conn,
                                      long value)
add a if-modified-since property on http header.

Parameters:
conn -
value -

setETagValue

public static void setETagValue(HttpURLConnection conn,
                                String etag)
do nothing if etag == null otherwise add a If-None-Match property in http header

Parameters:
conn -
etag -

getLastModified

public static long getLastModified(HttpURLConnection conn)

getETagValue

public static String getETagValue(HttpURLConnection conn)

setUserAgent

public static void setUserAgent(HttpURLConnection conn,
                                String agent)


Copyright © 2002-2007 Niko Schmuck. All Rights Reserved.