org.stanwood.media.util
Class Stream

java.lang.Object
  extended by org.stanwood.media.util.Stream

public class Stream
extends java.lang.Object

This class is used to get a input stream and the details of the stream when downloading a URL


Constructor Summary
Stream(java.io.InputStream is, java.lang.String mimeType, java.lang.String charset, java.lang.String cacheKey, java.net.URL url)
          The constructor
 
Method Summary
 java.lang.String getCacheKey()
          When caching the stream, use the cache key
 java.lang.String getCharset()
          Used to get the charset type of the stream
 java.io.InputStream getInputStream()
          Used to get the input stream
 java.lang.String getMineType()
          Used to get the mime type of the stream
 java.net.URL getURL()
          Used to get the URL the stream was read from
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Stream

public Stream(java.io.InputStream is,
              java.lang.String mimeType,
              java.lang.String charset,
              java.lang.String cacheKey,
              java.net.URL url)
The constructor

Parameters:
is - The input stream to the contents of the URL
mimeType - The mime type of the stream
charset - The charset type of the stream
cacheKey - When caching the stream, use the cache key
url - The URL the stream was read from
Method Detail

getMineType

public java.lang.String getMineType()
Used to get the mime type of the stream

Returns:
the mime type of the stream

getInputStream

public java.io.InputStream getInputStream()
Used to get the input stream

Returns:
the input stream

getCharset

public java.lang.String getCharset()
Used to get the charset type of the stream

Returns:
the charset type of the stream

getCacheKey

public java.lang.String getCacheKey()
When caching the stream, use the cache key

Returns:
The cache key

getURL

public java.net.URL getURL()
Used to get the URL the stream was read from

Returns:
The URL the stream was read from