< prev index next >

jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/HeaderTokenizer.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -93,18 +93,19 @@
          * delimiter or a control character, the type is that character
          * itself, converted to an integer. Otherwise, it's value is
          * one of the following:
          * <ul>
          * <li><code>ATOM</code> A sequence of ASCII characters
-         *      delimited by either SPACE, CTL, "(", <"> or the
-         *      specified SPECIALS
+         *      delimited by either SPACE, CTL, "(", &lt;"&gt; or the
+         *      specified SPECIALS</li>
          * <li><code>QUOTEDSTRING</code> A sequence of ASCII characters
-         *      within quotes
+         *      within quotes</li>
          * <li><code>COMMENT</code> A sequence of ASCII characters
-         *      within "(" and ")".
-         * <li><code>EOF</code> End of header
+         *      within "(" and ")".</li>
+         * <li><code>EOF</code> End of header</li>
          * </ul>
+         * @return type
          */
         public int getType() {
             return type;
         }
 

@@ -174,10 +175,11 @@
 
     /**
      * Constructor. The RFC822 defined delimiters - RFC822 - are
      * used to delimit ATOMS. Also comments are skipped and not
      * returned as tokens
+     * @param header The header that is tokenized.
      */
     public HeaderTokenizer(String header)  {
         this(header, RFC822);
     }
 

@@ -315,11 +317,11 @@
         // Check for SPECIAL or CTL
         if (c < 040 || c >= 0177 || delimiters.indexOf(c) >= 0) {
             currentPos++; // re-position currentPos
             char ch[] = new char[1];
             ch[0] = c;
-            return new Token((int)c, new String(ch));
+            return new Token(c, new String(ch));
         }
 
         // Check for ATOM
         for (start = currentPos; currentPos < maxPos; currentPos++) {
             c = string.charAt(currentPos);
< prev index next >