Package org.zoolu.sip.provider

Examples of org.zoolu.sip.provider.SipParser.goTo()


      //par.skipString(); // skip the auth_scheme
      par.skipWSPCRLF();
      while (par.hasMore())
      {  String name=par.getWord(name_separators);
         if (name.equals(param_name))
         {  par.goTo('=').skipChar().skipWSP();
            int comma=par.indexOfCommaHeaderSeparator();
            if (comma>=0)
               par=new SipParser(par.getString(comma-par.getPos()));
            return par.getStringUnquoted();
         }
View Full Code Here


         }
         if (line.startsWith(SipHeaders.Contact))
         {  SipParser par=new SipParser(line);
            name_address=((SipParser)par.skipString()).getNameAddress();
            //System.out.println("DEBUG: "+name_address);
            expire=(new SipParser(par.goTo("expires=").skipN(8).getStringUnquoted())).getDate();
            //System.out.println("DEBUG: "+expire);
            getUserBindingInfo(user).addContact(name_address,expire);
            continue;
        
      }
View Full Code Here

   /** Gets the value of specified parameter.
     * @return null if parameter does not exist. */
   public String getParameter(String name)  { 
     SipParser par = new SipParser(url);
      return ((SipParser)par.goTo(';').skipChar()).getParameter(name);
   }
  
  
   /** Gets a String Vector of parameter names.
     * @return null if no parameter is present */
 
View Full Code Here

  
   /** Gets a String Vector of parameter names.
     * @return null if no parameter is present */
   public Vector getParameters() { 
     SipParser par = new SipParser(url);
       return ((SipParser)par.goTo(';').skipChar()).getParameters();
   }
  
   /** Whether there is the specified parameter */
   public boolean hasParameter(String name) { 
     SipParser par = new SipParser(url);
View Full Code Here

   }
  
   /** Whether there is the specified parameter */
   public boolean hasParameter(String name) { 
     SipParser par = new SipParser(url);
       return ((SipParser)par.goTo(';').skipChar()).hasParameter(name);
   }
  
   /** Whether there are any parameters */
   public boolean hasParameters() { 
     if (url != null && url.indexOf(';') >= 0) return true;
View Full Code Here

   }*/

   /** Gets the transport protocol */
   public String getProtocol()
   {  SipParser par=new SipParser(value);
      return par.goTo('/').skipChar().goTo('/').skipChar().skipWSP().getString();
   }

   /** Gets "sent-by" parameter */
   public String getSentBy()
   {  SipParser par=new SipParser(value);
View Full Code Here

   }

   /** Gets "sent-by" parameter */
   public String getSentBy()
   {  SipParser par=new SipParser(value);
      par.goTo('/').skipChar().goTo('/').skipString().skipWSP();
      if (!par.hasMore()) return null;
      String sentby=value.substring(par.getPos(),par.indexOfSeparator());
      return sentby;
   }

View Full Code Here

   /** Gets host of ViaHeader */
   public String getHost()
   {  String sentby=getSentBy();
      SipParser par=new SipParser(sentby);
      par.goTo(':');
      if (par.hasMore()) return sentby.substring(0,par.getPos());
      else return sentby;
   }

   /** Returns boolean value indicating if ViaHeader has port */
 
View Full Code Here

   }
  
   /** Gets port of ViaHeader */
   public int getPort()
   {  SipParser par=new SipParser(getSentBy());
      par.goTo(':');
      if (par.hasMore()) return par.skipChar().getInt();
      return -1;
   }
  
   /** Makes a SipURL from ViaHeader */
 
View Full Code Here

      par.skipString(); // skip the auth_scheme
      par.skipWSPCRLF();
      while (par.hasMore())
      {  String name=par.getWord(name_separators);
         if (name.equals(param_name))
         {  par.goTo('=').skipChar().skipWSP();
            int comma=par.indexOfCommaHeaderSeparator();
            if (comma>=0)
               par=new SipParser(par.getString(comma-par.getPos()));
            return par.getStringUnquoted();
         }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.