ccs.http
Class ContentConnection

java.lang.Object
  extended by java.net.URLConnection
      extended by ccs.http.ContentConnection

Deprecated. This seems to be disused.

public class ContentConnection
extends java.net.URLConnection

A connnection which returns its content via a SwappingBuffer. This is a common mechanism. This class is logically abstract; as it stands, it doesn't do anything. Generally you'll override connect to set the content, returned to the caller via the SwappingBuffer q.


Field Summary
protected  SwappingBuffer q
          Deprecated. The SwappingBuffer which will contain the return from this connection.
 
Fields inherited from class java.net.URLConnection
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches
 
Constructor Summary
protected ContentConnection(java.net.URL url)
          Deprecated. Construct a ContentConnection.
 
Method Summary
 void connect()
          Deprecated. Connect to the resource.
 int getContentLength()
          Deprecated. Return the length of the content.
 java.lang.String getContentType()
          Deprecated. Return the MIME type of the content.
 java.io.InputStream getInputStream()
          Deprecated. Get an input stream.
 
Methods inherited from class java.net.URLConnection
addRequestProperty, getAllowUserInteraction, getConnectTimeout, getContent, getContent, getContentEncoding, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFields, getIfModifiedSince, getLastModified, getOutputStream, getPermission, getReadTimeout, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCaches, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

q

protected SwappingBuffer q
Deprecated. 
The SwappingBuffer which will contain the return from this connection. Initially null.

Constructor Detail

ContentConnection

protected ContentConnection(java.net.URL url)
Deprecated. 
Construct a ContentConnection. No default ctor is available.

Method Detail

connect

public void connect()
             throws java.io.IOException
Deprecated. 
Connect to the resource. A good place to do any init which might throw. Your subclass should call this if it overrides it.

Specified by:
connect in class java.net.URLConnection
Throws:
java.io.IOException

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Deprecated. 
Get an input stream. Generally you won't need to override this.

Overrides:
getInputStream in class java.net.URLConnection
Throws:
java.io.IOException

getContentLength

public int getContentLength()
Deprecated. 
Return the length of the content. Generally you won't need to override this.

Overrides:
getContentLength in class java.net.URLConnection

getContentType

public java.lang.String getContentType()
Deprecated. 
Return the MIME type of the content. Either set q.mimeType or leave everything alone to have the system make up its own mind (based on the URL as usual).

Overrides:
getContentType in class java.net.URLConnection