Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tapestry5.services.assets
Interface ContentTypeAnalyzer

All Known Implementing Classes:
  ContentTypeAnalyzerImpl

    @UsesMappedConfiguration(value=java.lang.String.class)
    public interface ContentTypeAnalyzer

Used to determine the MIME content type for a resource. The service configuration is the first step, followed by `Context.getMimeType(String)`, and then (finally) "application/octet-stream" as a stop-gap.

The service configuration maps the file extension (e.g., "png") to its corresponding MIME type (e.g., "image/png");

Method Summary
`java.lang.String` | `getContentType(Resource resource)` Analyze the resource to determine its content type.

Method Detail

### getContentType

    java.lang.String getContentType(Resource resource)

  Analyze the resource to determine its content type.

  Parameters:
    `resource` - to analyze
  Returns:
    a MIME content type

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2012 The Apache Software Foundation.