# Class MetaScanner

java.lang.Object
nu.validator.htmlparser.impl.MetaScanner

Direct Known Subclasses:
  `MetaSniffer`

public abstract class MetaScanner extends Object

## Field Summary

Fields
Modifier and Type
Field
Description
`protected ByteReadable`
`readable`
The data source.
`protected int`
`stateSave`
The tokenizer state.

## Constructor Summary

Constructors
Constructor
Description
`MetaScanner()`

## Method Summary

Modifier and Type
Method
Description
`protected int`
`read()`
Reads a byte from the data source.
`protected final void`
`stateLoop(int state)`
The runs the meta scanning algorithm.
`protected abstract boolean`
`tryCharset(String encoding)`
Tries to switch to an encoding.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### readable

protected ByteReadable readable
The data source.

### stateSave

protected int stateSave
The tokenizer state.

## Constructor Details

### MetaScanner

public MetaScanner()

## Method Details

### read

protected int read() throws IOException
Reads a byte from the data source. -1 means end.

Returns:
Throws:
  `IOException`

### stateLoop

protected final void stateLoop(int state) throws SAXException, IOException
The runs the meta scanning algorithm.

Throws:
  `SAXException`
  `IOException`

### tryCharset

protected abstract boolean tryCharset(String encoding) throws SAXException
Tries to switch to an encoding.

Parameters:
  `encoding` -
Returns:
  `true` if successful
Throws:
  `SAXException`