public abstract class FormReader extends Object
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
replace
Indicates that the raw data in the input buffer has to be replaced with '*'
|
| Constructor and Description |
|---|
FormReader(FormLimit formLimit,
PasswordManager pm)
Create an HTML form reader, encoded in UTF-8.
|
| Modifier and Type | Method and Description |
|---|---|
static int |
convertHexDigit(int c)
Convert an HEX digit to a byte.
|
int |
get(int size,
byte[] buf,
int offset,
int length)
This method is called when the ByteBuffer has to
be read for further parsing ; it is used to fill
the "buf" byte array.
|
abstract CaptureContext<?> |
getCurrentCaptureContext()
Hold the passwords that are extracted ; the
capture context also indicates which fields
in the form has to be captured, and hold a
reference to the incoming data source.
|
abstract void |
log(Exception exception)
Log an exception.
|
abstract int |
readItem(byte[] buf,
int i)
Read the next byte ; if the
replace
flag is set, the input source AND the buffer have
to be set to '*', but the byte read has to kept
unchanged. |
void |
reset()
Reset this form reader.
|
protected boolean replace
public FormReader(FormLimit formLimit, PasswordManager pm)
formLimit - The size limits of the form to read.pm - Used to create safe passwords.public void reset()
public int get(int size,
byte[] buf,
int offset,
int length)
size - The max amount of data that can be read.buf - The target buffer to fill.offset - The offset index to read.length - The length to read.public abstract int readItem(byte[] buf,
int i)
replace
flag is set, the input source AND the buffer have
to be set to '*', but the byte read has to kept
unchanged.buf - The target buffer to fill.i - The index of the target buffer.public abstract CaptureContext<?> getCurrentCaptureContext()
public abstract void log(Exception exception)
exception - The exception to log.public static int convertHexDigit(int c)
c - An ASCII encoded character 0-9 a-f A-FCopyright © 2018 Alternet. All rights reserved.