ecologylab.net
Class PURLConnection
java.lang.Object
ecologylab.generic.Debug
ecologylab.net.PURLConnection
public class PURLConnection
- extends Debug
Combines URLConnection with InputStream, providing convenience.
- Author:
- andruid
|
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 |
inputStream
protected java.io.InputStream inputStream
urlConnection
protected java.net.URLConnection urlConnection
mimeType
protected java.lang.String mimeType
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 -
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