Package com.huangzhimin.contacts.exception

Examples of com.huangzhimin.contacts.exception.ContactsException


        int index = content.indexOf("<form") + 5;
        content = content.substring(index,
                index + 500 <= content.length() ? index + 500 : content.length());
        Matcher matcher = p.matcher(content);
        if (!matcher.find()) {
            throw new ContactsException("Can't find from url");
        }
        return matcher.group(1);
    }
View Full Code Here


        int end = content.substring(
                index,
                index + 500 <= content.length() ? index + 500 : content.length()).indexOf(">") + index;
        Matcher matcher = p.matcher(content.substring(start, end));
        if (!matcher.find()) {
            throw new ContactsException("Can't find input value");
        }
        return matcher.group(1);
    }
View Full Code Here

      client.getState().addCookie(
          new Cookie("mail.cn.yahoo.com", "cn_challenge", challenge, "/", null, false));
      String redirectUrl = getJSRedirectLocation(content);
      doGet(redirectUrl);
    } catch (Exception e) {
      throw new ContactsException("Yahoo protocol has changed", e);
    }
  }
View Full Code Here

                                    contacts.add(new Contact(username, email));
        }
      }
      return contacts;
    } catch (Exception e) {
      throw new ContactsException("Yahoo protocol has changed", e);
    }
  }
View Full Code Here

              .getTime(), false));

      doGet(loginUrl, "http://mail.sohu.com");
      contactsUrl = lastUrl + "#addressList";
    } catch (Exception e) {
      throw new ContactsException("sohu protocol has changed", e);
    }
  }
View Full Code Here

        }

      }
      return contacts;
    } catch (Exception e) {
      throw new ContactsException("sohu protocol has changed", e);
    }
  }
View Full Code Here

TOP

Related Classes of com.huangzhimin.contacts.exception.ContactsException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.