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 methods 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
IOException
protected boolean findText(BufferedReader in, String literal) throws IOException
IOException
protected 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.IOException
javax.servlet.ServletException
protected abstract FormValidation check() throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
Copyright © 2004–2021. All rights reserved.