org.apache.cocoon.servletservice
Class ServletConnection

java.lang.Object
  extended byorg.apache.cocoon.servletservice.ServletConnection

public final class ServletConnection
extends Object

Implementation of a URLConnection that gets its content by invoking the Block. TODO Plenty of work left to have a meaningfull implementation of all methods

Version:
$Id: ServletConnection.java 577519 2007-09-20 03:05:26Z vgritsenko $

Constructor Summary
ServletConnection(String url)
          Construct a new object
 
Method Summary
 void connect()
           
 String getContentType()
           
 String getHeaderField(String name)
           
 long getHeaderFieldDate(String name, long Default)
           
 InputStream getInputStream()
          Return an InputStream object to read from the source.
 long getLastModified()
           
 OutputStream getOutputStream()
          Returns an output stream that writes as POST to this connection.
 int getResponseCode()
           
 void setIfModifiedSince(long ifmodifiedsince)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletConnection

public ServletConnection(String url)
                  throws MalformedURLException
Construct a new object

Method Detail

connect

public void connect()
             throws IOException,
                    ServletException
Throws:
IOException
ServletException

getInputStream

public InputStream getInputStream()
                           throws IOException,
                                  ServletException
Return an InputStream object to read from the source.

Throws:
IOException
ServletException

setIfModifiedSince

public void setIfModifiedSince(long ifmodifiedsince)

getLastModified

public long getLastModified()

getContentType

public String getContentType()

getHeaderFieldDate

public long getHeaderFieldDate(String name,
                               long Default)

getHeaderField

public String getHeaderField(String name)

getResponseCode

public int getResponseCode()
                    throws IOException
Throws:
IOException

getOutputStream

public OutputStream getOutputStream()
                             throws IllegalStateException
Returns an output stream that writes as POST to this connection.

Returns:
an output stream that writes as POST to this connection.
Throws:
IllegalStateException - - if already connected


Copyright © 1999-2007 The Apache Software Foundation. All Rights Reserved.