Examples of NotModifiedException


Examples of ca.wowapi.exceptions.NotModifiedException

    final char[] buffer = new char[0x1000];
    StringBuilder out = new StringBuilder();
    Reader in = null;
    if (urlConnection.getResponseCode() == 304) {
      throw new NotModifiedException();
    } else if (urlConnection.getResponseCode() < 400) {
      in = new InputStreamReader(urlConnection.getInputStream(), "UTF-8");
    } else {
      in = new InputStreamReader(urlConnection.getErrorStream(), "UTF-8");
    }
View Full Code Here

Examples of com.commafeed.backend.HttpGetter.NotModifiedException

    }

    String hash = DigestUtils.sha1Hex(content);
    if (lastContentHash != null && hash != null && lastContentHash.equals(hash)) {
      log.debug("content hash not modified: {}", feedUrl);
      throw new NotModifiedException("content hash not modified");
    }

    if (lastPublishedDate != null && fetchedFeed.getFeed().getLastPublishedDate() != null
        && lastPublishedDate.getTime() == fetchedFeed.getFeed().getLastPublishedDate().getTime()) {
      log.debug("publishedDate not modified: {}", feedUrl);
      throw new NotModifiedException("publishedDate not modified");
    }

    Feed feed = fetchedFeed.getFeed();
    feed.setLastModifiedHeader(result.getLastModifiedSince());
    feed.setEtagHeader(FeedUtils.truncate(result.getETag(), 255));
View Full Code Here

Examples of com.google.gdata.util.NotModifiedException

      case HttpURLConnection.HTTP_UNAUTHORIZED:
        throw new AuthenticationException(httpConn);

      case HttpURLConnection.HTTP_NOT_MODIFIED:
        throw new NotModifiedException(httpConn);

      case HttpURLConnection.HTTP_PRECON_FAILED:
        throw new PreconditionFailedException(httpConn);

      case HttpURLConnection.HTTP_NOT_IMPLEMENTED:
View Full Code Here

Examples of com.google.gdata.util.NotModifiedException

    throws NotModifiedException {
      if (ifModifiedSince == null) {
        throw new DidNotPassIfModifiedSinceException();
      }
      if (riggedFeed == null) {
        throw new NotModifiedException();
      } else {
        return riggedFeed;
      }
    }
View Full Code Here

Examples of com.google.gdata.util.NotModifiedException

    public BaseFeed getFeed(URL feedUrl, Class klass, DateTime ifModifiedSince)
    throws NotModifiedException {
      List userList =
        (script.size() > callCount) ? (List) script.get(callCount++) : null;
      if (userList == null) {
        throw new NotModifiedException();
      } else {
        List entryList = new LinkedList();
        for (Iterator iter = userList.iterator(); iter.hasNext(); ) {
          UserEntry userEntry = new UserEntry();
          Login login = new Login();
View Full Code Here

Examples of com.google.gdata.util.NotModifiedException

 
  public void testHandlesNotModifiedException() {
    Service alwaysNotModifiedService = new Service() {
      public BaseFeed query(Query query, Class entryClass, DateTime since)
      throws ServiceException {
        throw new NotModifiedException();
      }
    };
   
    try {
      GdConnector gdc = new GdConnector();
View Full Code Here

Examples of com.google.gdata.util.NotModifiedException

      case HttpURLConnection.HTTP_UNAUTHORIZED:
        throw new AuthenticationException(httpConn);

      case HttpURLConnection.HTTP_NOT_MODIFIED:
        throw new NotModifiedException(httpConn);

      case HttpURLConnection.HTTP_PRECON_FAILED:
        throw new PreconditionFailedException(httpConn);

      case HttpURLConnection.HTTP_NOT_IMPLEMENTED:
View Full Code Here

Examples of com.google.gdata.util.NotModifiedException

      case HttpURLConnection.HTTP_UNAUTHORIZED:
        throw new AuthenticationException(httpConn);

      case HttpURLConnection.HTTP_NOT_MODIFIED:
        throw new NotModifiedException(httpConn);

      case HttpURLConnection.HTTP_PRECON_FAILED:
        throw new PreconditionFailedException(httpConn);

      case HttpURLConnection.HTTP_NOT_IMPLEMENTED:
View Full Code Here

Examples of net.fortytwo.twitlogic.services.twitter.errors.NotModifiedException

                }

                // All of the below involve throwing an exception.
                switch (code) {
                    case 304:
                        throw new NotModifiedException();
                    case 400:
                        throw new BadRequestException();
                    case 401:
                        throw new UnauthorizedException();
                    case 403:
View Full Code Here

Examples of org.rssowl.core.connection.NotModifiedException

  @Test
  @SuppressWarnings("nls")
  public void testConditionalGet() throws Exception {
    URI feedUrl = new URI("http://rss.slashdot.org/Slashdot/slashdot/to");
    IFeed feed = new Feed(feedUrl);
    NotModifiedException e = null;

    InputStream inS = new DefaultProtocolHandler().openStream(feed.getLink(), null);
    assertNotNull(inS);

    String ifModifiedSince = null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.