org.rometools.fetcher.impl
Class ResponseHandler

java.lang.Object
  extended by org.rometools.fetcher.impl.ResponseHandler

public class ResponseHandler
extends Object

Utility class to help deal with HTTP responses


Field Summary
static String defaultCharacterEncoding
           
 
Constructor Summary
ResponseHandler()
           
 
Method Summary
static String getCharacterEncoding(String contentTypeHeader)
          Gets the character encoding of a response.
static String getCharacterEncoding(URLConnection connection)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultCharacterEncoding

public static final String defaultCharacterEncoding
See Also:
Constant Field Values
Constructor Detail

ResponseHandler

public ResponseHandler()
Method Detail

getCharacterEncoding

public static String getCharacterEncoding(URLConnection connection)

getCharacterEncoding

public static String getCharacterEncoding(String contentTypeHeader)

Gets the character encoding of a response. (Note that this is different to the content-encoding)

Parameters:
contentTypeHeader - the value of the content-type HTTP header eg: text/html; charset=ISO-8859-4
Returns:
the character encoding, eg: ISO-8859-4


Copyright © 2004-2013 ROME Project. All Rights Reserved.