@Override public void runCheck() throws Exception { super.runCheck(); final GetMethod getMethod = getGetMethod(fileURL); if (makeRedirectedRequest(getMethod)) { checkProblems(); checkNameAndSize(); } else { checkProblems(); throw new PluginImplementationException(); } }
@Override public void runCheck() throws Exception { // this method validates file super.runCheck(); final GetMethod getMethod = getGetMethod(fileURL); // make first request if (makeRedirectedRequest(getMethod)) { checkProblems(); checkNameAndSize(getContentAsString()); // ok let's extract file name and size from the page } else { checkProblems(); throw new ServiceConnectionProblemException(); } }
@Override public void runCheck() throws Exception { checkUrl(); super.runCheck(); final HttpMethod method = getGetMethod(fileURL); if (makeRedirectedRequest(method)) { checkProblems(); checkNameAndSize(); } else { checkProblems(); throw new ServiceConnectionProblemException(); } }