コード例 #1
0
 @Override
 public void runCheck() throws Exception {
   super.runCheck();
   final GetMethod getMethod = getGetMethod(fileURL);
   if (makeRedirectedRequest(getMethod)) {
     checkProblems();
     checkNameAndSize();
   } else {
     checkProblems();
     throw new PluginImplementationException();
   }
 }
コード例 #2
0
 @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();
   }
 }
コード例 #3
0
 @Override
 public void runCheck() throws Exception {
   checkUrl();
   super.runCheck();
   final HttpMethod method = getGetMethod(fileURL);
   if (makeRedirectedRequest(method)) {
     checkProblems();
     checkNameAndSize();
   } else {
     checkProblems();
     throw new ServiceConnectionProblemException();
   }
 }