Package gov.nist.javax.sip.header.ims

Examples of gov.nist.javax.sip.header.ims.PrivacyList


  public SIPHeader parse() throws ParseException
  {
    if (debug)
      dbg_enter("PrivacyParser.parse");

    PrivacyList privacyList = new PrivacyList();
   
    try
    {
      this.headerName(TokenTypes.PRIVACY);
     
      while (lexer.lookAhead(0) != '\n') {
        this.lexer.SPorHT();
       
        Privacy privacy = new Privacy();
        privacy.setHeaderName(SIPHeaderNamesIms.PRIVACY);

        this.lexer.match(TokenTypes.ID);
        Token token = lexer.getNextToken();
        privacy.setPrivacy(token.getTokenValue());
        this.lexer.SPorHT();
        privacyList.add(privacy);
       
        // Parsing others option-tags
        while (lexer.lookAhead(0) == ';')
        {
          this.lexer.match(';');
          this.lexer.SPorHT();
          privacy = new Privacy();
          this.lexer.match(TokenTypes.ID);
          token = lexer.getNextToken();
          privacy.setPrivacy(token.getTokenValue());
          this.lexer.SPorHT();

          privacyList.add(privacy);
        }
      }
     
      return privacyList;
     
View Full Code Here


      };
     
    for (int i = 0; i < rou.length; i++ ) {
        PrivacyParser rp =
        new PrivacyParser(rou[i]);
        PrivacyList list = (PrivacyList) rp.parse();
        System.out.println("encoded = " +list.encode());
    }
    }
View Full Code Here

    public SIPHeader parse() throws ParseException
    {
        if (debug)
            dbg_enter("PrivacyParser.parse");

        PrivacyList privacyList = new PrivacyList();

        try
        {
            this.headerName(TokenTypes.PRIVACY);

            while (lexer.lookAhead(0) != '\n') {
                this.lexer.SPorHT();

                Privacy privacy = new Privacy();
                privacy.setHeaderName(SIPHeaderNamesIms.PRIVACY);

                this.lexer.match(TokenTypes.ID);
                Token token = lexer.getNextToken();
                privacy.setPrivacy(token.getTokenValue());
                this.lexer.SPorHT();
                privacyList.add(privacy);

                // Parsing others option-tags
                while (lexer.lookAhead(0) == ';')
                {
                    this.lexer.match(';');
                    this.lexer.SPorHT();
                    privacy = new Privacy();
                    this.lexer.match(TokenTypes.ID);
                    token = lexer.getNextToken();
                    privacy.setPrivacy(token.getTokenValue());
                    this.lexer.SPorHT();

                    privacyList.add(privacy);
                }
            }

            return privacyList;
View Full Code Here

            };

        for (int i = 0; i < rou.length; i++ ) {
            PrivacyParser rp =
              new PrivacyParser(rou[i]);
            PrivacyList list = (PrivacyList) rp.parse();
            System.out.println("encoded = " +list.encode());
        }
    }
View Full Code Here

TOP

Related Classes of gov.nist.javax.sip.header.ims.PrivacyList

Copyright © 2018 www.massapicom. 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.