KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > nutch > protocol > ResourceMoved


1 /* Copyright (c) 2004 The Nutch Organization. All rights reserved. */
2 /* Use subject to the conditions in http://www.nutch.org/LICENSE.txt. */
3
4 package net.nutch.protocol;
5
6 import java.io.IOException JavaDoc;
7 import java.net.URL JavaDoc;
8
9 /** Thrown by {@link Protocol#getContent(String)} when a {@link URL} no longer
10  * exists.*/

11 public class ResourceMoved extends IOException JavaDoc {
12   private URL JavaDoc oldUrl;
13   private URL JavaDoc newUrl;
14
15   public ResourceMoved(URL JavaDoc oldUrl, URL JavaDoc newUrl, String JavaDoc message) {
16     super(message);
17     this.newUrl = newUrl;
18     this.oldUrl = oldUrl;
19   }
20
21   public URL JavaDoc getNewUrl() { return newUrl; }
22   public URL JavaDoc getOldUrl() { return oldUrl; }
23 }
24
Popular Tags