1
0
mirror of https://github.com/Rogiel/httpchannel synced 2025-12-05 23:22:51 +00:00

Implements uploadhere.com service

This commit is contained in:
2012-01-15 20:23:01 -02:00
parent 23f80b50e6
commit 1719e54b77
34 changed files with 790 additions and 429 deletions

View File

@@ -3,6 +3,7 @@
*/
package com.rogiel.httpchannel.captcha;
import java.net.MalformedURLException;
import java.net.URL;
/**
@@ -17,8 +18,10 @@ public interface ImageCaptchaService<C extends ImageCaptcha> extends
* @param image
* the image {@link URL}
* @return a new captcha
* @throws MalformedURLException
* if any error occur while creating the Image {@link URL}
*/
C create(String html);
C create(String html) throws MalformedURLException;
/**
* Tries to automatically resolve the captcha

View File

@@ -43,7 +43,7 @@ public abstract class AbstractService implements Service {
this.captchaResolver = captchaResolver;
}
protected boolean resolveCaptcha(Captcha captcha)
protected void resolveCaptcha(Captcha captcha)
throws UnresolvedCaptchaException {
if (captchaResolver == null)
throw new UnresolvedCaptchaException();
@@ -51,6 +51,5 @@ public abstract class AbstractService implements Service {
throw new UnresolvedCaptchaException();
if (captcha.getAnswer() == null)
throw new UnresolvedCaptchaException();
return true;
}
}