org.apache.archiva.webdav.util
Class MimeTypes

java.lang.Object
  extended by org.apache.archiva.webdav.util.MimeTypes

@Service(value="mimeTpes")
public class MimeTypes
extends Object

MimeTypes


Field Summary
private static String DEFAULT_MIME_TYPE
           
private  org.slf4j.Logger log
           
private  Map<String,String> mimeMap
           
private  String resource
           
 
Constructor Summary
MimeTypes()
           
 
Method Summary
 String getMimeType(String filename)
          Get the Mime Type for the provided filename.
 String getResource()
           
 void initialize()
           
 void load(File file)
           
 void load(InputStream mimeStream)
           
 void load(String resourceName)
           
 void setResource(String resource)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MIME_TYPE

private static final String DEFAULT_MIME_TYPE
See Also:
Constant Field Values

resource

private String resource

mimeMap

private Map<String,String> mimeMap

log

private org.slf4j.Logger log
Constructor Detail

MimeTypes

public MimeTypes()
Method Detail

getMimeType

public String getMimeType(String filename)
Get the Mime Type for the provided filename.

Parameters:
filename - the filename to obtain the mime type for.
Returns:
a mime type String, or null if filename is null, has no extension, or no mime type is associated with it.

initialize

@PostConstruct
public void initialize()

load

public void load(File file)

load

public void load(String resourceName)

load

public void load(InputStream mimeStream)

getResource

public String getResource()

setResource

public void setResource(String resource)


Copyright © 2006-2013 The Apache Software Foundation. All Rights Reserved.