javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/InputStreamDataSource.java
changeset 79 2f468c1958d0
parent 23 98ccebc37403
equal deleted inserted replaced
76:4ad59aaee882 79:2f468c1958d0
    20 
    20 
    21 import javax.microedition.media.Control;
    21 import javax.microedition.media.Control;
    22 import javax.microedition.media.protocol.DataSource;
    22 import javax.microedition.media.protocol.DataSource;
    23 import javax.microedition.media.protocol.SourceStream;
    23 import javax.microedition.media.protocol.SourceStream;
    24 import java.io.IOException;
    24 import java.io.IOException;
       
    25 import javax.microedition.io.StreamConnection;
       
    26 import com.nokia.mj.impl.utils.Logger;
       
    27 import javax.microedition.io.Connection;
       
    28 
    25 
    29 
    26 /**
    30 /**
    27  * DataSource which has InputStreamSourceStream.
    31  * DataSource which has InputStreamSourceStream.
    28  */
    32  */
    29 public class InputStreamDataSource extends DataSource
    33 public class InputStreamDataSource extends DataSource
    30 {
    34 {
       
    35     // Connection object.
       
    36     protected StreamConnection iConnection;
       
    37 
    31     // DataSource's stream
    38     // DataSource's stream
    32     protected InputStreamSourceStream iSourceStream;
    39     protected InputStreamSourceStream iSourceStream;
       
    40 
       
    41 
    33 
    42 
    34     // string that describes the content-type of the media that the source
    43     // string that describes the content-type of the media that the source
    35     // is providing.
    44     // is providing.
    36     protected String iContentType;
    45     protected String iContentType;
       
    46 
       
    47 
       
    48 
    37 
    49 
    38     /**
    50     /**
    39      * Constructor.
    51      * Constructor.
    40      * @param aSourceStream SourceSteam
    52      * @param aSourceStream SourceSteam
    41      * @param aType Content type.
    53      * @param aType Content type.
   156     public Control getControl(String aControlType)
   168     public Control getControl(String aControlType)
   157     {
   169     {
   158         return iSourceStream.getControl("SeekControl");
   170         return iSourceStream.getControl("SeekControl");
   159     }
   171     }
   160 
   172 
       
   173     /**
       
   174     * public method to connection object in derived classes.
       
   175     * @returns aConnection object
       
   176     */
       
   177     public Connection getConnection()
       
   178     {
       
   179         Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,"InputStreamDataSource getConnection +");
       
   180         return iConnection;
       
   181     }
       
   182 
       
   183 
       
   184 
       
   185 
   161 }
   186 }
   162 // End of File
   187 // End of File
   163 
   188