javax.media.protocol
Class URLDataSource.URLSourceStream

java.lang.Object
  |
  +--javax.media.protocol.InputSourceStream
        |
        +--javax.media.protocol.URLDataSource.URLSourceStream
All Implemented Interfaces:
Controls, Controls, PullSourceStream, SourceStream
Enclosing class:
URLDataSource

class URLDataSource.URLSourceStream
extends InputSourceStream

Create a PullSourceStream from a URLConnection.


Field Summary
protected  java.net.URLConnection conn
           
 
Fields inherited from class javax.media.protocol.InputSourceStream
contentType, eosReached, stream
 
Fields inherited from interface javax.media.protocol.SourceStream
LENGTH_UNKNOWN
 
Constructor Summary
URLDataSource.URLSourceStream(java.net.URLConnection conn, ContentDescriptor type)
           
 
Method Summary
 long getContentLength()
          Obtain the number of bytes available on this stream.
 
Methods inherited from class javax.media.protocol.InputSourceStream
close, endOfStream, getContentDescriptor, getControl, getControls, read, willReadBlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

conn

protected java.net.URLConnection conn
Constructor Detail

URLDataSource.URLSourceStream

public URLDataSource.URLSourceStream(java.net.URLConnection conn,
                                     ContentDescriptor type)
                              throws java.io.IOException
Method Detail

getContentLength

public long getContentLength()
Obtain the number of bytes available on this stream.

Specified by:
getContentLength in interface SourceStream
Overrides:
getContentLength in class InputSourceStream
Returns:
the content length for this stream.