FileDocCategorySizeDatePackage
TransportHeader.javaAPI DocJMF 2.1.1e1572Mon May 12 12:20:54 BST 2003com.sun.media.rtsp.protocol

TransportHeader

public class TransportHeader extends Object

Fields Summary
private String
transportProtocol
private String
profile
private String
lowerTransport
private int
server_data_port
private int
server_control_port
Constructors Summary
public TransportHeader(String str)

        // Debug.println("TransportHeader: " + str);

        int end = str.indexOf('/");

        transportProtocol = str.substring(0, end);


	// client port:
	int start = str.indexOf( "client_port");

	if( start > 0)
	{
	}

	// server port:
	start = str.indexOf( "server_port");

	if( start > 0)
	{
	    // data port:
	    start = str.indexOf("=", start) + 1;

	    end = str.indexOf("-", start);

            String data_str = str.substring(start, end);

            server_data_port = new Integer(data_str).intValue();

	    // control port:
	    start = end + 1;

	    end = str.indexOf(";", start);

	    String control_str;

	    if( end > 0)
	    {
		control_str = str.substring( start, end);
	    }
	    else
	    {		
                control_str = str.substring(start);	    
	    }
	    
            server_control_port = new Integer(control_str).intValue();		
	}
    
Methods Summary
public intgetServerControlPort()

        return server_control_port;
    
public intgetServerDataPort()

        return server_data_port;
    
public java.lang.StringgetTransportProtocol()

        return transportProtocol;