ecologylab.net
Class PURLConnection

java.lang.Object
  extended by ecologylab.generic.Debug
      extended by ecologylab.net.PURLConnection

public class PURLConnection
extends Debug

Combines URLConnection with InputStream, providing convenience.

Author:
andruid

Field Summary
protected  java.io.InputStream inputStream
           
protected  java.lang.String mimeType
           
protected  java.net.URLConnection urlConnection
           
 
Constructor Summary
PURLConnection(java.net.URLConnection urlConnection, java.io.InputStream inputStream)
          Fill out the instance of this resulting from a succcessful connect().
 
Method Summary
 java.io.InputStream inputStream()
           
 java.lang.String mimeType()
          Find the mime type returned by the web server to the URLConnection, in its header.
 void recycle()
           
 java.net.URLConnection urlConnection()
           
 
Methods inherited from class ecologylab.generic.Debug
classSimpleName, closeLoggingFile, debug, debug, debug, debug, debugA, debugA, debugA, debugI, debugI, debugI, error, error, getClassName, getClassName, getInteractive, getPackageName, getPackageName, getPackageName, initialize, level, level, level, logToFile, print, print, println, println, println, println, println, println, printlnA, printlnA, printlnA, printlnI, printlnI, printlnI, printlnI, setLoggingFile, show, show, superString, toggleInteractive, toString, toString, warning, warning, weird, weird
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

inputStream

protected java.io.InputStream inputStream

urlConnection

protected java.net.URLConnection urlConnection

mimeType

protected java.lang.String mimeType
Constructor Detail

PURLConnection

public PURLConnection(java.net.URLConnection urlConnection,
                      java.io.InputStream inputStream)
Fill out the instance of this resulting from a succcessful connect().

Parameters:
urlConnection -
inputStream -
Method Detail

recycle

public void recycle()

inputStream

public java.io.InputStream inputStream()
Returns:
Returns the inputStream.

urlConnection

public java.net.URLConnection urlConnection()
Returns:
Returns the urlConnection.

mimeType

public java.lang.String mimeType()
Find the mime type returned by the web server to the URLConnection, in its header. Thus, if there is no URLConnection (as for local file system), this always returns null.

Returns:
the mime type or null