|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcz.vity.freerapid.plugins.webclient.hoster.CaptchaSupport
public class CaptchaSupport
Class that help to manage working with CAPTCHA in plugins.
| Constructor Summary | |
|---|---|
CaptchaSupport(HttpDownloadClient client,
DialogSupport dialogSupport)
Constructor |
|
| Method Summary | |
|---|---|
String |
askForCaptcha(BufferedImage image)
Shows default simple input dialog for getting input from user. |
String |
getCaptcha(String url)
Shows default simple input dialog for getting input from user. |
BufferedImage |
getCaptchaImage(String url)
Method downloads image from given URL. |
BufferedImage |
loadCaptcha(InputStream inputStream)
Method creates image from given data input stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CaptchaSupport(HttpDownloadClient client,
DialogSupport dialogSupport)
client - current HTTP connection managerdialogSupport - support for showing simple dialogs to user| Method Detail |
|---|
public String askForCaptcha(BufferedImage image)
throws Exception
image - CAPTCHA image to show user
Exception - if something went wrong - thread interruptionDialogSupport.askForCaptcha(java.awt.image.BufferedImage)
public String getCaptcha(String url)
throws FailedToLoadCaptchaPictureException
url - CAPTCHA image url
FailedToLoadCaptchaPictureException - if http operation failed to load remote image
public BufferedImage getCaptchaImage(String url)
throws FailedToLoadCaptchaPictureException
url - CAPTCHA image url
FailedToLoadCaptchaPictureException - if http operation failed to load remote image
public BufferedImage loadCaptcha(InputStream inputStream)
throws FailedToLoadCaptchaPictureException
inputStream - data input stream
FailedToLoadCaptchaPictureException - if reading from input stream failed to load image
NullPointerException - if given input stream is null
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||