com.canoo.webtest.engine
Class MimeMap

java.lang.Object
  extended by com.canoo.webtest.engine.MimeMap

public class MimeMap
extends Object

Contains mapping between mime types and preferred extension. This is used when saving received content to determine file extension from the received mime type.

Author:
Marc Guillemot, Paul King

Field Summary
static String EXCEL_MIME_TYPE
           
static String UNKNOWN_BINARY_MIME_TYPE
           
 
Constructor Summary
MimeMap()
           
 
Method Summary
static String adjustMimeTypeIfNeeded(String contentType, String responseFileName)
          HtmlUnit doesn't guess contentType of Excel files from the file system.
static String getExtension(String contentType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXCEL_MIME_TYPE

public static final String EXCEL_MIME_TYPE
See Also:
Constant Field Values

UNKNOWN_BINARY_MIME_TYPE

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

MimeMap

public MimeMap()
Method Detail

getExtension

public static String getExtension(String contentType)

adjustMimeTypeIfNeeded

public static String adjustMimeTypeIfNeeded(String contentType,
                                            String responseFileName)
HtmlUnit doesn't guess contentType of Excel files from the file system. Should probably be moved to htmlunit.


Copyright © 2001-2007 Canoo Engineering AG, Basel. All rights reserved.