Examples of SipParser


Examples of org.zoolu.sip.provider.SipParser

     name = name_address.getDisplayName();
       url = name_address.getAddress();
   }

   public NameAddress(String naddr) { 
     SipParser par = new SipParser(naddr);
       NameAddress na = par.getNameAddress();
      //DEBUG
      //if (na==null)
      //{  System.out.println("DEBUG: NameAddress: par:\r\n"+par.getWholeString());
      //   System.exit(0);
      //}
View Full Code Here

Examples of org.zoolu.sip.provider.SipParser

   }

   /** Gets content-length of ContentLengthHeader */
   public String getContentType()
   {  String str;
      int end=(new SipParser(value)).indexOf(';');
      if (end<0) str=value; else str=value.substring(0,end);
      return (new SipParser(str)).getString();
   }
View Full Code Here

Examples of org.zoolu.sip.provider.SipParser

   /** Gets the value of specified parameter.
     * @returns the parameter value or null if parameter does not exist or doesn't have a value (i.e. in case of flag parameter). */
   public String getParameter(String name)
   {  int index=indexOfFirstSemi();
      if (index<0) return null;
      return (new SipParser((new Parser(getValue(),index)).skipChar().skipWSP())).getParameter(name);
   }
View Full Code Here

Examples of org.zoolu.sip.provider.SipParser

   /** Gets a String Vector of parameter names.
     * @returns a Vector of String */
   public Vector getParameterNames()
   {  int index=indexOfFirstSemi();
      if (index<0) return new Vector();
      return (new SipParser((new Parser(getValue(),index)).skipChar().skipWSP())).getParameters();
   }
View Full Code Here

Examples of org.zoolu.sip.provider.SipParser

   /** Whether there is the specified parameter */
   public boolean hasParameter(String name)
   {  int index=indexOfFirstSemi();
      if (index<0) return false;
      return (new SipParser((new Parser(getValue(),index)).skipChar().skipWSP())).hasParameter(name);
   }
View Full Code Here

Examples of org.zoolu.sip.provider.SipParser

   super(hd);
   }

   /** Gets content-length of ContentLengthHeader */
   public int getContentLength()
   {  return (new SipParser(value)).getInt();
   }
View Full Code Here

Examples of org.zoolu.sip.provider.SipParser

  
   /** Gets value of ExpiresHeader as delta-seconds */
   public int getDeltaSeconds()
   {  int secs=-1;
      if (isDate())
      {  Date date=(new SipParser((new Parser(value)).getStringUnquoted())).getDate();
         secs=(int)((date.getTime()-System.currentTimeMillis())/1000);
         if (secs<0) secs=0;
      }
      else secs=(new SipParser(value)).getInt();

      return secs;
   }
View Full Code Here

Examples of org.zoolu.sip.provider.SipParser

   /** Gets value of ExpiresHeader as absolute date */
   public Date getDate()
   {  Date date=null;
      if (isDate())
      {  date=(new SipParser((new Parser(value)).getStringUnquoted())).getDate();
      }
      else
      long secs=getDeltaSeconds();
         if (secs>=0) date=new Date(System.currentTimeMillis()+secs*1000);
      }
View Full Code Here

Examples of org.zoolu.sip.provider.SipParser

   /** Costructs a MultipleHeader from a comma-separated header */
   public MultipleHeader(Header hd)
   {  name=hd.getName();
      values=new Vector();
      SipParser par=new SipParser(hd.getValue());
      int comma=par.indexOfCommaHeaderSeparator();
      while (comma>=0)
      {  values.addElement(par.getString(comma-par.getPos()).trim());
         par.skipChar(); //skip comma
         comma=par.indexOfCommaHeaderSeparator();
      }
      values.addElement(par.getRemainingString().trim());
      compact=true;     
   }
View Full Code Here

Examples of org.zoolu.sip.provider.SipParser

      compact=mhd.isCommaSeparated();     
   }

   /** Checks if Header <i>hd</i> contains comma-separated multi-header */
   public static boolean isCommaSeparated(Header hd)
   {  SipParser par=new SipParser(hd.getValue());
      return par.indexOfCommaHeaderSeparator()>=0;
   }
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.