Interface WritableCachedResponse

  • All Superinterfaces:
    CacheResponse

    @Deprecated
    public interface WritableCachedResponse
    extends CacheResponse
    Deprecated.
    WritableCachedResponse
    Version:
    $Id: WritableCachedResponse.java#2 $
    Author:
    Harald Kuhr
    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      void addHeader​(java.lang.String pName, java.lang.String pValue)
      Deprecated.
      Adds a header key/value pair for this response.
      com.twelvemonkeys.servlet.cache.CachedResponse getCachedResponse()
      Deprecated.
      Returns the final (immutable) CachedResponse created by this WritableCachedResponse.
      java.lang.String[] getHeaderNames()
      Deprecated.
      Gets the header names of all headers set in this response.
      java.lang.String getHeaderValue​(java.lang.String pHeaderName)
      Deprecated.
      Gets the first header value set for the given header in this response.
      java.lang.String[] getHeaderValues​(java.lang.String pHeaderName)
      Deprecated.
      Gets all header values set for the given header in this response.
      java.io.OutputStream getOutputStream()
      Deprecated.
      Gets the OutputStream for this cached response.
      int getStatus()
      Deprecated.
       
      void setHeader​(java.lang.String pName, java.lang.String pValue)
      Deprecated.
      Sets a header key/value pair for this response.
      int size()
      Deprecated.
      Returns the size of this cached response in bytes.
      void writeContentsTo​(java.io.OutputStream pStream)
      Deprecated.
      Writes the cahced content to the response
      void writeHeadersTo​(CacheResponse pResponse)
      Deprecated.
      Writes the cached headers to the response
    • Method Detail

      • getOutputStream

        java.io.OutputStream getOutputStream()
        Deprecated.
        Gets the OutputStream for this cached response. This allows a client to write to the cached response.
        Specified by:
        getOutputStream in interface CacheResponse
        Returns:
        the OutputStream for this response.
      • setHeader

        void setHeader​(java.lang.String pName,
                       java.lang.String pValue)
        Deprecated.
        Sets a header key/value pair for this response. Any prior header value for the given header key will be overwritten.
        Specified by:
        setHeader in interface CacheResponse
        Parameters:
        pName - the header name
        pValue - the header value
        See Also:
        addHeader(String, String)
      • addHeader

        void addHeader​(java.lang.String pName,
                       java.lang.String pValue)
        Deprecated.
        Adds a header key/value pair for this response. If a value allready exists for the given key, the value will be appended.
        Specified by:
        addHeader in interface CacheResponse
        Parameters:
        pName - the header name
        pValue - the header value
        See Also:
        setHeader(String, String)
      • getCachedResponse

        com.twelvemonkeys.servlet.cache.CachedResponse getCachedResponse()
        Deprecated.
        Returns the final (immutable) CachedResponse created by this WritableCachedResponse.
        Returns:
        the CachedResponse
      • writeHeadersTo

        void writeHeadersTo​(CacheResponse pResponse)
        Deprecated.
        Writes the cached headers to the response
        Parameters:
        pResponse - the servlet response
      • writeContentsTo

        void writeContentsTo​(java.io.OutputStream pStream)
                      throws java.io.IOException
        Deprecated.
        Writes the cahced content to the response
        Parameters:
        pStream - the response output stream
        Throws:
        java.io.IOException - if an I/O exception occurs during write
      • getStatus

        int getStatus()
        Deprecated.
      • getHeaderNames

        java.lang.String[] getHeaderNames()
        Deprecated.
        Gets the header names of all headers set in this response.
        Returns:
        an array of Strings
      • getHeaderValues

        java.lang.String[] getHeaderValues​(java.lang.String pHeaderName)
        Deprecated.
        Gets all header values set for the given header in this response. If the header is not set, null is returned.
        Parameters:
        pHeaderName - the header name
        Returns:
        an array of Strings, or null if there is no such header in this response.
      • getHeaderValue

        java.lang.String getHeaderValue​(java.lang.String pHeaderName)
        Deprecated.
        Gets the first header value set for the given header in this response. If the header is not set, null is returned. Useful for headers that don't have multiple values, like "Content-Type" or "Content-Length".
        Parameters:
        pHeaderName - the header name
        Returns:
        a String, or null if there is no such header in this response.
      • size

        int size()
        Deprecated.
        Returns the size of this cached response in bytes.
        Returns:
        the size