public abstract static class FormValidation.URLCheck extends Object
This allows the check method to call various utility methods in a concise syntax.
| Constructor and Description |
|---|
URLCheck() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract FormValidation |
check()
Implement the actual form validation logic, by using other convenience methosd defined in this class.
|
protected boolean |
findText(BufferedReader in,
String literal)
Finds the string literal from the given reader.
|
protected FormValidation |
handleIOException(String url,
IOException e)
Calls the
FormValidation.error(String) method with a reasonable error message. |
protected BufferedReader |
open(URL url)
Opens the given URL and reads text content from it.
|
protected BufferedReader open(URL url) throws IOException
IOExceptionprotected boolean findText(BufferedReader in, String literal) throws IOException
IOExceptionprotected FormValidation handleIOException(String url, IOException e) throws IOException, javax.servlet.ServletException
FormValidation.error(String) method with a reasonable error message.
Use this method when the open(URL) or findText(BufferedReader, String) fails.url - Pass in the URL that was connected. Used for error diagnosis.IOExceptionjavax.servlet.ServletExceptionprotected abstract FormValidation check() throws IOException, javax.servlet.ServletException
IOExceptionjavax.servlet.ServletExceptionCopyright © 2019. All rights reserved.