| java.lang.Object | |
| ↳ | java.util.Scanner | 
A parser that parses a text string of primitive types and strings with the help of regular expressions. It supports localized numbers and various radixes. The input is broken into tokens by the delimiter pattern, which is whitespace by default. The primitive types can be obtained via corresponding next* methods. If the token is not in a valid format, an InputMismatchException is thrown. 
For example:
 Scanner s = new Scanner("1A true");
 System.out.println(s.nextInt(16));
 System.out.println(s.nextBoolean());
  
       Yields the result: 26 true 
A Scanner can also find or skip specific patterns without regard for the delimiter. All these methods and the various next* and hasNext* methods may block. 
 The Scanner class is not thread-safe. 
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  | 
           Creates a 
            Scannerwith the specifiedFileas input. | ||||||||||
|  | 
           Creates a 
            Scannerwith the specifiedFileas input. | ||||||||||
|  | 
           Creates a 
            Scanneron the specified string. | ||||||||||
|  | 
           Creates a 
            Scanneron the specifiedInputStream. | ||||||||||
|  | 
           Creates a 
            Scanneron the specifiedInputStream. | ||||||||||
|  | 
           Creates a 
            Scannerwith the specifiedReadableas input. | ||||||||||
|  | 
           Creates a 
            Scannerwith the specifiedReadableByteChannelas input. | ||||||||||
|  | 
           Creates a 
            Scannerwith the specifiedReadableByteChannelas input. | ||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  | 
           Closes this 
            Scannerand the underlying input if the input implementsCloseable. | ||||||||||
|  | 
           Returns the delimiter 
            Patternin use by thisScanner. | ||||||||||
|  | 
           Compiles the pattern string and tries to find a substing matching it in the input data.
           | ||||||||||
|  | 
           Tries to find the pattern in the input.
           | ||||||||||
|  | 
           Tries to find the pattern in the input between the current position and the specified horizon.
           | ||||||||||
|  | 
           Tries to find the pattern in the input between the current position and the specified 
            horizon. | ||||||||||
|  | 
           Returns whether this 
            Scannerhas one or more tokens remaining to parse. | ||||||||||
|  | 
           Returns 
            trueif thisScannerhas one or more tokens remaining to parse and the next token matches a pattern compiled from the given string. | ||||||||||
|  | 
           Returns whether this 
            Scannerhas one or more tokens remaining to parse and the next token matches the given pattern. | ||||||||||
|  | 
           Returns whether the next token can be translated into a valid 
            BigDecimal. | ||||||||||
|  | 
           Returns whether the next token can be translated into a valid 
            BigIntegerin the specified radix. | ||||||||||
|  | 
           Returns whether the next token can be translated into a valid 
            BigIntegerin the default radix. | ||||||||||
|  | 
           Returns whether the next token can be translated into a valid 
            booleanvalue. | ||||||||||
|  | 
           Returns whether the next token can be translated into a valid 
            bytevalue in the default radix. | ||||||||||
|  | 
           Returns whether the next token can be translated into a valid 
            bytevalue in the specified radix. | ||||||||||
|  | 
           Returns whether the next token translated into a valid 
            doublevalue. | ||||||||||
|  | 
           Returns whether the next token can be translated into a valid 
            floatvalue. | ||||||||||
|  | 
           Returns whether the next token can be translated into a valid 
            intvalue in the specified radix. | ||||||||||
|  | 
           Returns whether the next token can be translated into a valid 
            intvalue in the default radix. | ||||||||||
|  | 
           Returns whether there is a line terminator in the input.
           | ||||||||||
|  | 
           Returns whether the next token can be translated into a valid 
            longvalue in the specified radix. | ||||||||||
|  | 
           Returns whether the next token can be translated into a valid 
            longvalue in the default radix. | ||||||||||
|  | 
           Returns whether the next token can be translated into a valid 
            shortvalue in the specified radix. | ||||||||||
|  | 
           Returns whether the next token can be translated into a valid 
            shortvalue in the default radix. | ||||||||||
|  | 
           Returns the last 
            IOExceptionthat was raised while reading from the underlying input. | ||||||||||
|  | 
           Return the 
            Localeof thisScanner. | ||||||||||
|  | 
           Returns the result of the last matching operation.
           | ||||||||||
|  | 
           Returns the next token.
           | ||||||||||
|  | 
           Returns the next token if it matches the specified pattern.
           | ||||||||||
|  | 
           Returns the next token if it matches the specified pattern.
           | ||||||||||
|  | 
           Returns the next token as a 
            BigDecimal. | ||||||||||
|  | 
           Returns the next token as a 
            BigIntegerwith the specified radix. | ||||||||||
|  | 
           Returns the next token as a 
            BigInteger. | ||||||||||
|  | 
           Returns the next token as a 
            boolean. | ||||||||||
|  | 
           Returns the next token as a 
            byte. | ||||||||||
|  | 
           Returns the next token as a 
            bytewith the specified radix. | ||||||||||
|  | 
           Returns the next token as a 
            double. | ||||||||||
|  | 
           Returns the next token as a 
            float. | ||||||||||
|  | 
           Returns the next token as an 
            intwith the specified radix. | ||||||||||
|  | 
           Returns the next token as an 
            int. | ||||||||||
|  | 
           Returns the skipped input and advances the 
            Scannerto the beginning of the next line. | ||||||||||
|  | 
           Returns the next token as a 
            longwith the specified radix. | ||||||||||
|  | 
           Returns the next token as a 
            long. | ||||||||||
|  | 
           Returns the next token as a 
            shortwith the specified radix. | ||||||||||
|  | 
           Returns the next token as a 
            short. | ||||||||||
|  | 
           Return the radix of this 
            Scanner. | ||||||||||
|  | 
           Remove is not a supported operation on 
            Scanner. | ||||||||||
|  | 
           Resets this scanner's delimiter, locale, and radix.
           | ||||||||||
|  | 
           Tries to use the specified string to construct a pattern and then uses the constructed pattern to match input starting from the current position.
           | ||||||||||
|  | 
           Tries to use specified pattern to match input starting from the current position.
           | ||||||||||
|  | 
           Returns a string representation of this 
            Scanner. | ||||||||||
|  | 
           Sets the delimiting pattern of this 
            Scannerwith a pattern compiled from the supplied string value. | ||||||||||
|  | 
           Sets the delimiting pattern of this 
            Scanner. | ||||||||||
|  | 
           Sets the 
            Localeof thisScannerto a specifiedLocale. | ||||||||||
|  | 
           Sets the radix of this 
            Scannerto the specified radix. | ||||||||||
| [Expand] 
           Inherited Methods
           | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  From class java.lang.Object | |||||||||||
|  From interface java.util.Iterator | |||||||||||
Creates a Scanner with the specified File as input. The default charset is applied when reading the file.
| src | the file to be scanned. | 
|---|
| FileNotFoundException | if the specified file does not exist. | 
|---|
Creates a Scanner with the specified File as input. The specified charset is applied when reading the file.
| src | the file to be scanned. | 
|---|---|
| charsetName | the name of the encoding type of the file. | 
| FileNotFoundException | if the specified file does not exist. | 
|---|---|
| IllegalArgumentException | if the specified coding does not exist. | 
Creates a Scanner on the specified string.
| src | the string to be scanned. | 
|---|
Creates a Scanner on the specified InputStream. The default charset is applied when decoding the input.
| src | the InputStreamto be scanned. | 
|---|
Creates a Scanner on the specified InputStream. The specified charset is applied when decoding the input.
| src | the InputStreamto be scanned. | 
|---|---|
| charsetName | the encoding type of the InputStream. | 
| IllegalArgumentException | if the specified character set is not found. | 
|---|
Creates a Scanner with the specified Readable as input.
| src | the Readableto be scanned. | 
|---|
Creates a Scanner with the specified ReadableByteChannel as input. The default charset is applied when decoding the input.
| src | the ReadableByteChannelto be scanned. | 
|---|
Creates a Scanner with the specified ReadableByteChannel as input. The specified charset is applied when decoding the input.
| src | the ReadableByteChannelto be scanned. | 
|---|---|
| charsetName | the encoding type of the content. | 
| IllegalArgumentException | if the specified character set is not found. | 
|---|
Closes this Scanner and the underlying input if the input implements Closeable. If the Scanner has been closed, this method will have no effect. Any scanning operation called after calling this method will throw an IllegalStateException.
Returns the delimiter Pattern in use by this Scanner.
Pattern in use by this Scanner. Compiles the pattern string and tries to find a substing matching it in the input data. The delimiter will be ignored. This is the same as invoking findInLine(Pattern.compile(pattern)).
| pattern | a string used to construct a pattern which is in turn used to match a substring of the input data. | 
|---|
null if the pattern is not found before the next line terminator.| IllegalStateException | if the Scanneris closed. | 
|---|
Tries to find the pattern in the input. Delimiters are ignored. If the pattern is found before line terminator, the matched string will be returned, and the Scanner will advance to the end of the matched string. Otherwise, null will be returned and the Scanner will not advance. When waiting for input, the Scanner may be blocked. All the input may be cached if no line terminator exists in the buffer.
| pattern | the pattern to find in the input. | 
|---|
null if the pattern is not found before the next line terminator.| IllegalStateException | if the Scanneris closed. | 
|---|
Tries to find the pattern in the input between the current position and the specified horizon. Delimiters are ignored. If the pattern is found, the matched string will be returned, and the Scanner will advance to the end of the matched string. Otherwise, null will be returned and Scanner will not advance. When waiting for input, the Scanner may be blocked. 
 The Scanner's search will never go more than horizon code points from current position. The position of horizon does have an effect on the result of the match. For example, when the input is "123" and current position is at zero, findWithinHorizon(Pattern.compile("\\p{Digit}{3}"), 2) will return null, while findWithinHorizon(Pattern.compile("\\p{Digit}{3}"), 3) will return "123". horizon is treated as a transparent, non-anchoring bound. (refer to useTransparentBounds(boolean) and useAnchoringBounds(boolean)) 
 A horizon whose value is zero will be ignored and the whole input will be used for search. In this situation, all the input may be cached.
| pattern | the pattern used to scan. | 
|---|---|
| horizon | the search limit. | 
null if the pattern is not found within the specified horizon.| IllegalStateException | if the Scanneris closed. | 
|---|---|
| IllegalArgumentException | if horizonis less than zero. | 
Tries to find the pattern in the input between the current position and the specified horizon. Delimiters are ignored. This call is the same as invoking findWithinHorizon(Pattern.compile(pattern)).
| pattern | the pattern used to scan. | 
|---|---|
| horizon | the search limit. | 
null if the pattern is not found within the specified horizon.| IllegalStateException | if the Scanneris closed. | 
|---|---|
| IllegalArgumentException | if horizonis less than zero. | 
Returns whether this Scanner has one or more tokens remaining to parse. This method will block if the data is still being read.
true if this Scanner has one or more tokens remaining, otherwise false.| IllegalStateException | if the Scannerhas been closed. | 
|---|
Returns true if this Scanner has one or more tokens remaining to parse and the next token matches a pattern compiled from the given string. This method will block if the data is still being read. This call is equivalent to hasNext(Pattern.compile(pattern)).
| pattern | the string specifying the pattern to scan for | 
|---|
true if the specified pattern matches this Scanner's next token, false otherwise.| IllegalStateException | if the Scannerhas been closed. | 
|---|
Returns whether this Scanner has one or more tokens remaining to parse and the next token matches the given pattern. This method will block if the data is still being read.
| pattern | the pattern to check for. | 
|---|
true if this Scanner has more tokens and the next token matches the pattern, false otherwise.| IllegalStateException | if the Scannerhas been closed. | 
|---|
Returns whether the next token can be translated into a valid BigDecimal.
true if the next token can be translated into a valid BigDecimal, otherwise false.| IllegalStateException | if the Scannerhas been closed. | 
|---|
Returns whether the next token can be translated into a valid BigInteger in the specified radix.
| radix | the radix used to translate the token into a BigInteger. | 
|---|
true if the next token can be translated into a valid BigInteger, otherwise false.| IllegalStateException | if the Scannerhas been closed. | 
|---|
Returns whether the next token can be translated into a valid BigInteger in the default radix.
true if the next token can be translated into a valid BigInteger, otherwise false.| IllegalStateException | if the Scannerhas been closed. | 
|---|
Returns whether the next token can be translated into a valid boolean value.
true if the next token can be translated into a valid boolean value, otherwise false.| IllegalStateException | if the Scannerhas been closed. | 
|---|
Returns whether the next token can be translated into a valid byte value in the default radix.
true if the next token can be translated into a valid byte value, otherwise false.| IllegalStateException | if the Scannerhas been closed. | 
|---|
Returns whether the next token can be translated into a valid byte value in the specified radix.
| radix | the radix used to translate the token into a bytevalue | 
|---|
true if the next token can be translated into a valid byte value, otherwise false.| IllegalStateException | if the Scannerhas been closed. | 
|---|
Returns whether the next token translated into a valid double value.
true if the next token can be translated into a valid double value, otherwise false.| IllegalStateException | if the Scannerhas been closed. | 
|---|
Returns whether the next token can be translated into a valid float value.
true if the next token can be translated into a valid float value, otherwise false.| IllegalStateException | if the Scannerhas been closed. | 
|---|
Returns whether the next token can be translated into a valid int value in the specified radix.
| radix | the radix used to translate the token into an intvalue. | 
|---|
true if the next token in this Scanner's input can be translated into a valid int value, otherwise false.| IllegalStateException | if the Scannerhas been closed. | 
|---|
Returns whether the next token can be translated into a valid int value in the default radix.
true if the next token can be translated into a valid int value, otherwise false.| IllegalStateException | if the Scannerhas been closed, | 
|---|
Returns whether there is a line terminator in the input. This method may block.
true if there is a line terminator in the input, otherwise, false.| IllegalStateException | if the Scanneris closed. | 
|---|
Returns whether the next token can be translated into a valid long value in the specified radix.
| radix | the radix used to translate the token into a longvalue. | 
|---|
true if the next token can be translated into a valid long value, otherwise false.| IllegalStateException | if the Scannerhas been closed. | 
|---|
Returns whether the next token can be translated into a valid long value in the default radix.
true if the next token can be translated into a valid long value, otherwise false.| IllegalStateException | if the Scannerhas been closed. | 
|---|
Returns whether the next token can be translated into a valid short value in the specified radix.
| radix | the radix used to translate the token into a shortvalue. | 
|---|
true if the next token can be translated into a valid short value, otherwise false.| IllegalStateException | if the Scannerhas been closed. | 
|---|
Returns whether the next token can be translated into a valid short value in the default radix.
true if the next token can be translated into a valid short value, otherwise false.| IllegalStateException | if the Scannerhas been closed. | 
|---|
Returns the last IOException that was raised while reading from the underlying input.
IOException, or null if none was thrown. Return the Locale of this Scanner.
Locale of this Scanner. Returns the result of the last matching operation.
The next* and find* methods return the match result in the case of a successful match.
| IllegalStateException | if the match result is not available, of if the last match was not successful. | 
|---|
Returns the next token. The token will be both prefixed and postfixed by the delimiter that is currently being used (or a string that matches the delimiter pattern). This method will block if input is being read.
| IllegalStateException | if this Scannerhas been closed. | 
|---|---|
| NoSuchElementException | if input has been exhausted. | 
Returns the next token if it matches the specified pattern. The token will be both prefixed and postfixed by the delimiter that is currently being used (or a string that matches the delimiter pattern). This method will block if input is being read.
| pattern | the specified pattern to scan. | 
|---|
| IllegalStateException | if this Scannerhas been closed. | 
|---|---|
| NoSuchElementException | if input has been exhausted. | 
| InputMismatchException | if the next token does not match the pattern given. | 
Returns the next token if it matches the specified pattern. The token will be both prefixed and postfixed by the delimiter that is currently being used (or a string that matches the delimiter pattern). This method will block if input is being read. Calling this method is equivalent to next(Pattern.compile(pattern)).
| pattern | the string specifying the pattern to scan for. | 
|---|
| IllegalStateException | if this Scannerhas been closed. | 
|---|---|
| NoSuchElementException | if input has been exhausted. | 
| InputMismatchException | if the next token does not match the pattern given. | 
Returns the next token as a BigDecimal. This method will block if input is being read. If the next token can be translated into a BigDecimal the following is done: All Locale-specific prefixes, group separators, and Locale-specific suffixes are removed. Then non-ASCII digits are mapped into ASCII digits via digit(char, int), and a negative sign (-) is added if the Locale-specific negative prefix or suffix was present. Finally the resulting string is passed to BigDecimal(String) .
BigDecimal.| IllegalStateException | if this Scannerhas been closed. | 
|---|---|
| NoSuchElementException | if input has been exhausted. | 
| InputMismatchException | if the next token can not be translated into a valid BigDecimal. | 
Returns the next token as a BigInteger with the specified radix. This method will block if input is being read. If the next token can be translated into a BigInteger the following is done: All Locale-specific prefixes, group separators, and Locale-specific suffixes are removed. Then non-ASCII digits are mapped into ASCII digits via digit(char, int), and a negative sign (-) is added if the Locale-specific negative prefix or suffix was present. Finally the resulting String is passed to BigInteger(String, int)} with the specified radix.
| radix | the radix used to translate the token into a BigInteger. | 
|---|
BigInteger| IllegalStateException | if this Scannerhas been closed. | 
|---|---|
| NoSuchElementException | if input has been exhausted. | 
| InputMismatchException | if the next token can not be translated into a valid BigInteger. | 
Returns the next token as a BigInteger. This method will block if input is being read. Equivalent to nextBigInteger(DEFAULT_RADIX).
BigInteger.| IllegalStateException | if this Scannerhas been closed. | 
|---|---|
| NoSuchElementException | if input has been exhausted. | 
| InputMismatchException | if the next token can not be translated into a valid BigInteger. | 
Returns the next token as a boolean. This method will block if input is being read.
boolean.| IllegalStateException | if this Scannerhas been closed. | 
|---|---|
| NoSuchElementException | if input has been exhausted. | 
| InputMismatchException | if the next token can not be translated into a valid booleanvalue. | 
Returns the next token as a byte. This method will block if input is being read. Equivalent to nextByte(DEFAULT_RADIX).
byte.| IllegalStateException | if this Scannerhas been closed. | 
|---|---|
| NoSuchElementException | if input has been exhausted. | 
| InputMismatchException | if the next token can not be translated into a valid bytevalue. | 
Returns the next token as a byte with the specified radix. Will block if input is being read. If the next token can be translated into a byte the following is done: All Locale-specific prefixes, group separators, and Locale-specific suffixes are removed. Then non-ASCII digits are mapped into ASCII digits via digit(char, int), and a negative sign (-) is added if the Locale-specific negative prefix or suffix was present. Finally the resulting String is passed to parseByte(String, int)} with the specified radix.
| radix | the radix used to translate the token into bytevalue. | 
|---|
byte.| IllegalStateException | if this Scannerhas been closed. | 
|---|---|
| NoSuchElementException | if input has been exhausted. | 
| InputMismatchException | if the next token can not be translated into a valid bytevalue. | 
Returns the next token as a double. This method will block if input is being read. If the next token can be translated into a double the following is done: All Locale-specific prefixes, group separators, and Locale-specific suffixes are removed. Then non-ASCII digits are mapped into ASCII digits via digit(char, int), and a negative sign (-) is added if the Locale-specific negative prefix or suffix was present. Finally the resulting String is passed to parseDouble(String)}. If the token matches the localized NaN or infinity strings, it is also passed to parseDouble(String)}.
double.| IllegalStateException | if this Scannerhas been closed. | 
|---|---|
| NoSuchElementException | if input has been exhausted. | 
| InputMismatchException | if the next token can not be translated into a valid doublevalue. | 
Returns the next token as a float. This method will block if input is being read. If the next token can be translated into a float the following is done: All Locale-specific prefixes, group separators, and Locale-specific suffixes are removed. Then non-ASCII digits are mapped into ASCII digits via digit(char, int), and a negative sign (-) is added if the Locale-specific negative prefix or suffix was present. Finally the resulting String is passed to parseFloat(String)}.If the token matches the localized NaN or infinity strings, it is also passed to parseFloat(String)}.
float.| IllegalStateException | if this Scannerhas been closed. | 
|---|---|
| NoSuchElementException | if input has been exhausted. | 
| InputMismatchException | if the next token can not be translated into a valid floatvalue. | 
Returns the next token as an int with the specified radix. This method will block if input is being read. If the next token can be translated into an int the following is done: All Locale-specific prefixes, group separators, and Locale-specific suffixes are removed. Then non-ASCII digits are mapped into ASCII digits via digit(char, int), and a negative sign (-) is added if the Locale-specific negative prefix or suffix was present. Finally the resulting String is passed to parseInt(String, int) with the specified radix.
| radix | the radix used to translate the token into an intvalue. | 
|---|
int.| IllegalStateException | if this Scannerhas been closed. | 
|---|---|
| NoSuchElementException | if input has been exhausted. | 
| InputMismatchException | if the next token can not be translated into a valid intvalue. | 
Returns the next token as an int. This method will block if input is being read. Equivalent to nextInt(DEFAULT_RADIX).
int| IllegalStateException | if this Scannerhas been closed. | 
|---|---|
| NoSuchElementException | if input has been exhausted. | 
| InputMismatchException | if the next token can not be translated into a valid intvalue. | 
Returns the skipped input and advances the Scanner to the beginning of the next line. The returned result will exclude any line terminator. When searching, if no line terminator is found, then a large amount of input will be cached. If no line at all can be found, a NoSuchElementException will be thrown.
| IllegalStateException | if the Scanneris closed. | 
|---|---|
| NoSuchElementException | if no line can be found, e.g. when input is an empty string. | 
Returns the next token as a long with the specified radix. This method will block if input is being read. If the next token can be translated into a long the following is done: All Locale-specific prefixes, group separators, and Locale-specific suffixes are removed. Then non-ASCII digits are mapped into ASCII digits via digit(char, int), and a negative sign (-) is added if the Locale-specific negative prefix or suffix was present. Finally the resulting String is passed to parseLong(String, int)} with the specified radix.
| radix | the radix used to translate the token into a longvalue. | 
|---|
long.| IllegalStateException | if this Scannerhas been closed. | 
|---|---|
| NoSuchElementException | if input has been exhausted. | 
| InputMismatchException | if the next token can not be translated into a valid longvalue. | 
Returns the next token as a long. This method will block if input is being read. Equivalent to nextLong(DEFAULT_RADIX).
long.| IllegalStateException | if this Scannerhas been closed. | 
|---|---|
| NoSuchElementException | if input has been exhausted. | 
| InputMismatchException | if the next token can not be translated into a valid longvalue. | 
Returns the next token as a short with the specified radix. This method will block if input is being read. If the next token can be translated into a short the following is done: All Locale-specific prefixes, group separators, and Locale-specific suffixes are removed. Then non-ASCII digits are mapped into ASCII digits via digit(char, int), and a negative sign (-) is added if the Locale-specific negative prefix or suffix was present. Finally the resulting String is passed to parseShort(String, int)} with the specified radix.
| radix | the radix used to translate the token into shortvalue. | 
|---|
short.| IllegalStateException | if this Scannerhas been closed. | 
|---|---|
| NoSuchElementException | if input has been exhausted. | 
| InputMismatchException | if the next token can not be translated into a valid shortvalue. | 
Returns the next token as a short. This method will block if input is being read. Equivalent to nextShort(DEFAULT_RADIX).
short.| IllegalStateException | if this Scannerhas been closed. | 
|---|---|
| NoSuchElementException | if input has been exhausted. | 
| InputMismatchException | if the next token can not be translated into a valid shortvalue. | 
Return the radix of this Scanner.
Scanner Remove is not a supported operation on Scanner.
| UnsupportedOperationException | if this method is invoked. | 
|---|
Resets this scanner's delimiter, locale, and radix.
Tries to use the specified string to construct a pattern and then uses the constructed pattern to match input starting from the current position. The delimiter will be ignored. This call is the same as invoke skip(Pattern.compile(pattern)).
| pattern | the string used to construct a pattern which in turn is used to match input. | 
|---|
Scanner itself.| IllegalStateException | if the Scanneris closed. | 
|---|
Tries to use specified pattern to match input starting from the current position. The delimiter will be ignored. If a match is found, the matched input will be skipped. If an anchored match of the specified pattern succeeds, the corresponding input will also be skipped. Otherwise, a NoSuchElementException will be thrown. Patterns that can match a lot of input may cause the Scanner to read in a large amount of input.
| pattern | used to skip over input. | 
|---|
Scanner itself.| IllegalStateException | if the Scanneris closed. | 
|---|---|
| NoSuchElementException | if the specified pattern match fails. | 
Returns a string representation of this Scanner. The information returned may be helpful for debugging. The format of the string is unspecified.
Scanner. Sets the delimiting pattern of this Scanner with a pattern compiled from the supplied string value.
| pattern | a string from which a Patterncan be compiled. | 
|---|
Scanner. Sets the delimiting pattern of this Scanner.
| pattern | the delimiting pattern to use. | 
|---|
Scanner. Sets the Locale of this Scanner to a specified Locale.
| l | the specified Localeto use. | 
|---|
Scanner. Sets the radix of this Scanner to the specified radix.
| radix | the specified radix to use. | 
|---|
Scanner.