Class QuotedStringTokenizer

  • All Implemented Interfaces:
    java.util.Enumeration<java.lang.Object>

    @Deprecated(since="2021-05-27")
    public class QuotedStringTokenizer
    extends java.util.StringTokenizer
    Deprecated.
    The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.
    StringTokenizer with Quoting support. This class is a copy of the java.util.StringTokenizer API and the behaviour is the same, except that single and double quoted string values are recognised. Delimiters within quotes are not considered delimiters. Quotes can be escaped with '\'.
    See Also:
    StringTokenizer
    • Constructor Summary

      Constructors 
      Constructor Description
      QuotedStringTokenizer​(java.lang.String str)
      Deprecated.
       
      QuotedStringTokenizer​(java.lang.String str, java.lang.String delim)
      Deprecated.
       
      QuotedStringTokenizer​(java.lang.String str, java.lang.String delim, boolean returnDelimiters)
      Deprecated.
       
      QuotedStringTokenizer​(java.lang.String str, java.lang.String delim, boolean returnDelimiters, boolean returnQuotes)
      Deprecated.
       
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      int countTokens()
      Deprecated.
      Not implemented.
      boolean getDouble()
      Deprecated.
       
      boolean getSingle()
      Deprecated.
       
      boolean hasMoreElements()
      Deprecated.
       
      boolean hasMoreTokens()
      Deprecated.
       
      static boolean isQuoted​(java.lang.String s)
      Deprecated.
       
      java.lang.Object nextElement()
      Deprecated.
       
      java.lang.String nextToken()
      Deprecated.
       
      java.lang.String nextToken​(java.lang.String delim)
      Deprecated.
       
      static void quote​(java.lang.Appendable buffer, java.lang.String input)
      Deprecated.
      Quote a string into an Appendable.
      static java.lang.String quote​(java.lang.String s)
      Deprecated.
      Quote a string.
      static java.lang.String quoteIfNeeded​(java.lang.String s, java.lang.String delim)
      Deprecated.
      Quote a string.
      static void quoteOnly​(java.lang.Appendable buffer, java.lang.String input)
      Deprecated.
      Quote a string into an Appendable.
      void setDouble​(boolean d)
      Deprecated.
       
      void setSingle​(boolean single)
      Deprecated.
       
      static java.lang.String unquote​(java.lang.String s)
      Deprecated.
       
      static java.lang.String unquote​(java.lang.String s, boolean lenient)
      Deprecated.
      Unquote a string.
      static java.lang.String unquoteOnly​(java.lang.String s)
      Deprecated.
       
      static java.lang.String unquoteOnly​(java.lang.String s, boolean lenient)
      Deprecated.
      Unquote a string, NOT converting unicode sequences
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Enumeration

        asIterator
    • Constructor Detail

      • QuotedStringTokenizer

        public QuotedStringTokenizer​(java.lang.String str,
                                     java.lang.String delim,
                                     boolean returnDelimiters,
                                     boolean returnQuotes)
        Deprecated.
      • QuotedStringTokenizer

        public QuotedStringTokenizer​(java.lang.String str,
                                     java.lang.String delim,
                                     boolean returnDelimiters)
        Deprecated.
      • QuotedStringTokenizer

        public QuotedStringTokenizer​(java.lang.String str,
                                     java.lang.String delim)
        Deprecated.
      • QuotedStringTokenizer

        public QuotedStringTokenizer​(java.lang.String str)
        Deprecated.
    • Method Detail

      • hasMoreTokens

        public boolean hasMoreTokens()
        Deprecated.
        Overrides:
        hasMoreTokens in class java.util.StringTokenizer
      • nextToken

        public java.lang.String nextToken()
                                   throws java.util.NoSuchElementException
        Deprecated.
        Overrides:
        nextToken in class java.util.StringTokenizer
        Throws:
        java.util.NoSuchElementException
      • nextToken

        public java.lang.String nextToken​(java.lang.String delim)
                                   throws java.util.NoSuchElementException
        Deprecated.
        Overrides:
        nextToken in class java.util.StringTokenizer
        Throws:
        java.util.NoSuchElementException
      • hasMoreElements

        public boolean hasMoreElements()
        Deprecated.
        Specified by:
        hasMoreElements in interface java.util.Enumeration<java.lang.Object>
        Overrides:
        hasMoreElements in class java.util.StringTokenizer
      • nextElement

        public java.lang.Object nextElement()
                                     throws java.util.NoSuchElementException
        Deprecated.
        Specified by:
        nextElement in interface java.util.Enumeration<java.lang.Object>
        Overrides:
        nextElement in class java.util.StringTokenizer
        Throws:
        java.util.NoSuchElementException
      • countTokens

        public int countTokens()
        Deprecated.
        Not implemented.
        Overrides:
        countTokens in class java.util.StringTokenizer
      • quoteIfNeeded

        public static java.lang.String quoteIfNeeded​(java.lang.String s,
                                                     java.lang.String delim)
        Deprecated.
        Quote a string. The string is quoted only if quoting is required due to embedded delimiters, quote characters or the empty string.
        Parameters:
        s - The string to quote.
        delim - the delimiter to use to quote the string
        Returns:
        quoted string
      • quote

        public static java.lang.String quote​(java.lang.String s)
        Deprecated.
        Quote a string. The string is quoted only if quoting is required due to embedded delimiters, quote characters or the empty string.
        Parameters:
        s - The string to quote.
        Returns:
        quoted string
      • quoteOnly

        public static void quoteOnly​(java.lang.Appendable buffer,
                                     java.lang.String input)
        Deprecated.
        Quote a string into an Appendable. Only quotes and backslash are escaped.
        Parameters:
        buffer - The Appendable
        input - The String to quote.
      • quote

        public static void quote​(java.lang.Appendable buffer,
                                 java.lang.String input)
        Deprecated.
        Quote a string into an Appendable. The characters ", \, \n, \r, \t, \f and \b are escaped
        Parameters:
        buffer - The Appendable
        input - The String to quote.
      • unquoteOnly

        public static java.lang.String unquoteOnly​(java.lang.String s)
        Deprecated.
      • unquoteOnly

        public static java.lang.String unquoteOnly​(java.lang.String s,
                                                   boolean lenient)
        Deprecated.
        Unquote a string, NOT converting unicode sequences
        Parameters:
        s - The string to unquote.
        lenient - if true, will leave in backslashes that aren't valid escapes
        Returns:
        quoted string
      • unquote

        public static java.lang.String unquote​(java.lang.String s)
        Deprecated.
      • unquote

        public static java.lang.String unquote​(java.lang.String s,
                                               boolean lenient)
        Deprecated.
        Unquote a string.
        Parameters:
        s - The string to unquote.
        lenient - true if unquoting should be lenient to escaped content, leaving some alone, false if string unescaping
        Returns:
        quoted string
      • isQuoted

        public static boolean isQuoted​(java.lang.String s)
        Deprecated.
      • getDouble

        public boolean getDouble()
        Deprecated.
        Returns:
        handle double quotes if true
      • setDouble

        public void setDouble​(boolean d)
        Deprecated.
        Parameters:
        d - handle double quotes if true
      • getSingle

        public boolean getSingle()
        Deprecated.
        Returns:
        handle single quotes if true
      • setSingle

        public void setSingle​(boolean single)
        Deprecated.
        Parameters:
        single - handle single quotes if true