--- /dev/null
+package net.pterodactylus.sone.core;
+
+import freenet.client.FetchResult;
+import freenet.keys.FreenetURI;
+
+/**
+ * Container for a fetched URI and the {@link FetchResult}.
+ *
+ * @author <a href="mailto:d.roden@xplosion.de">David Roden</a>
+ */
+public class Fetched {
+
+ /** The fetched URI. */
+ private final FreenetURI freenetUri;
+
+ /** The fetch result. */
+ private final FetchResult fetchResult;
+
+ /**
+ * Creates a new fetched URI.
+ *
+ * @param freenetUri
+ * The URI that was fetched
+ * @param fetchResult
+ * The fetch result
+ */
+ public Fetched(FreenetURI freenetUri, FetchResult fetchResult) {
+ this.freenetUri = freenetUri;
+ this.fetchResult = fetchResult;
+ }
+
+ //
+ // ACCESSORS
+ //
+
+ /**
+ * Returns the fetched URI.
+ *
+ * @return The fetched URI
+ */
+ public FreenetURI getFreenetUri() {
+ return freenetUri;
+ }
+
+ /**
+ * Returns the fetch result.
+ *
+ * @return The fetch result
+ */
+ public FetchResult getFetchResult() {
+ return fetchResult;
+ }
+
+}
}
/**
- * Container for a fetched URI and the {@link FetchResult}.
- *
- * @author <a href="mailto:d.roden@xplosion.de">David Roden</a>
- */
- public static class Fetched {
-
- /** The fetched URI. */
- private final FreenetURI freenetUri;
-
- /** The fetch result. */
- private final FetchResult fetchResult;
-
- /**
- * Creates a new fetched URI.
- *
- * @param freenetUri
- * The URI that was fetched
- * @param fetchResult
- * The fetch result
- */
- public Fetched(FreenetURI freenetUri, FetchResult fetchResult) {
- this.freenetUri = freenetUri;
- this.fetchResult = fetchResult;
- }
-
- //
- // ACCESSORS
- //
-
- /**
- * Returns the fetched URI.
- *
- * @return The fetched URI
- */
- public FreenetURI getFreenetUri() {
- return freenetUri;
- }
-
- /**
- * Returns the fetch result.
- *
- * @return The fetch result
- */
- public FetchResult getFetchResult() {
- return fetchResult;
- }
-
- }
-
- /**
* Callback for USK watcher events.
*
* @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
import javax.inject.Inject;
-import net.pterodactylus.sone.core.FreenetInterface.Fetched;
import net.pterodactylus.sone.data.Sone;
import net.pterodactylus.sone.data.Sone.SoneStatus;
import net.pterodactylus.util.service.AbstractService;
import javax.inject.Singleton;
-import net.pterodactylus.sone.core.FreenetInterface.Fetched;
import net.pterodactylus.sone.core.event.UpdateFoundEvent;
import net.pterodactylus.sone.main.SonePlugin;
import net.pterodactylus.util.io.Closer;
import net.pterodactylus.sone.core.FreenetInterface.BackgroundFetchCallback;
import net.pterodactylus.sone.core.FreenetInterface.Callback;
-import net.pterodactylus.sone.core.FreenetInterface.Fetched;
import net.pterodactylus.sone.core.FreenetInterface.InsertToken;
import net.pterodactylus.sone.core.FreenetInterface.InsertTokenSupplier;
import net.pterodactylus.sone.core.event.ImageInsertAbortedEvent;
import java.io.IOException;
import java.io.InputStream;
-import net.pterodactylus.sone.core.FreenetInterface.Fetched;
import net.pterodactylus.sone.data.Sone;
import net.pterodactylus.sone.data.Sone.SoneStatus;
import net.pterodactylus.sone.freenet.wot.Identity;
import java.io.InputStream;
import net.pterodactylus.sone.core.FreenetInterface.Callback;
-import net.pterodactylus.sone.core.FreenetInterface.Fetched;
import net.pterodactylus.sone.core.event.UpdateFoundEvent;
import net.pterodactylus.util.version.Version;