com.go.teaservlet
Interface ApplicationResponse.DetachedData

All Superinterfaces:
java.io.Serializable
Enclosing class:
ApplicationResponse

public static interface ApplicationResponse.DetachedData
extends java.io.Serializable


Method Summary
 void compress()
          Compresses all the byte buffers using a deflater, unless already called before.
 void compress(int level)
          Compresses all the byte buffers using a deflater, unless already called before.
 void playback(ApplicationRequest request, ApplicationResponse response)
           
 

Method Detail

playback

public void playback(ApplicationRequest request,
                     ApplicationResponse response)
              throws java.lang.Exception

compress

public void compress()
Compresses all the byte buffers using a deflater, unless already called before. When this DetachedData is later played back for a request that accepts a compressed encoding, the compressed data is output. If the request doesn't accept compression, the original uncompressed data is output.

The deflater will usually use default strategy, default compression. If the amount of data to compress is small, the "no compression" (0) level is used.


compress

public void compress(int level)
Compresses all the byte buffers using a deflater, unless already called before. When this DetachedData is later played back for a request that accepts a compressed encoding, the compressed data is output. If the request doesn't accept compression, the original uncompressed data is output.

If the amount of data to compress is small, the "no compression" (0) level is used.

Parameters:
level - compression level 1 to 9. 1 is fastest, 9 offers best compression. 6 is default.