org.apache.tapestry5.internal.services
Class ResourceStreamerImpl

java.lang.Object
  extended by org.apache.tapestry5.internal.services.ResourceStreamerImpl
All Implemented Interfaces:
ResourceStreamer

public class ResourceStreamerImpl
extends Object
implements ResourceStreamer


Constructor Summary
ResourceStreamerImpl(Request request, Response response, Context context, ResourceCache resourceCache, Map<String,String> configuration, ResponseCompressionAnalyzer analyzer, int compressionCutoff)
           
 
Method Summary
 String getContentType(Resource resource)
          Analyzes the resource to determine what its content type is, possibly using the service's configuration.
 void streamResource(Resource resource)
          Streams the content of the resource to the client.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceStreamerImpl

public ResourceStreamerImpl(Request request,
                            Response response,
                            Context context,
                            ResourceCache resourceCache,
                            Map<String,String> configuration,
                            ResponseCompressionAnalyzer analyzer,
                            @Symbol(value="tapestry.min-gzip-size")
                            int compressionCutoff)
Method Detail

streamResource

public void streamResource(Resource resource)
                    throws IOException
Description copied from interface: ResourceStreamer
Streams the content of the resource to the client.

Specified by:
streamResource in interface ResourceStreamer
Throws:
IOException

getContentType

public String getContentType(Resource resource)
                      throws IOException
Description copied from interface: ResourceStreamer
Analyzes the resource to determine what its content type is, possibly using the service's configuration.

Specified by:
getContentType in interface ResourceStreamer
Parameters:
resource - to analyze
Returns:
content type
Throws:
IOException


Copyright © 2006-2009 Apache Software Foundation. All Rights Reserved.