From: David Roden Date: Tue, 17 Jun 2008 07:15:05 +0000 (+0000) Subject: fix email address X-Git-Tag: svn-import^0 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=ff359cddbc60c0066fdfde7f2679e95a4609dc17;p=jFCPlib.git fix email address reformat remove Id tags git-svn-id: file:///home/toad/git-migration/temprepository/trunk/apps/jFCPlib@20394 67a373e5-eb02-0410-a15c-ee090a768436 --- diff --git a/src/net/pterodactylus/fcp/ARK.java b/src/net/pterodactylus/fcp/ARK.java index 6fc3da9..f5b977c 100644 --- a/src/net/pterodactylus/fcp/ARK.java +++ b/src/net/pterodactylus/fcp/ARK.java @@ -23,7 +23,6 @@ package net.pterodactylus.fcp; * Container for ARKs (address resolution keys). * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class ARK { diff --git a/src/net/pterodactylus/fcp/AddPeer.java b/src/net/pterodactylus/fcp/AddPeer.java index 0229f17..7d74f0a 100644 --- a/src/net/pterodactylus/fcp/AddPeer.java +++ b/src/net/pterodactylus/fcp/AddPeer.java @@ -25,7 +25,6 @@ import java.net.URL; * The “AddPeer” request adds a peer to the node. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class AddPeer extends FcpMessage { diff --git a/src/net/pterodactylus/fcp/AllData.java b/src/net/pterodactylus/fcp/AllData.java index 35405b4..e6ed783 100644 --- a/src/net/pterodactylus/fcp/AllData.java +++ b/src/net/pterodactylus/fcp/AllData.java @@ -30,8 +30,7 @@ import java.io.InputStream; * passes through all registered {@link FcpListener}s without the payload being * consumed, the payload is discarded! * - * @author David Roden - * @version $Id$ + * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class AllData extends BaseMessage { diff --git a/src/net/pterodactylus/fcp/BaseMessage.java b/src/net/pterodactylus/fcp/BaseMessage.java index 70b1e73..d956b62 100644 --- a/src/net/pterodactylus/fcp/BaseMessage.java +++ b/src/net/pterodactylus/fcp/BaseMessage.java @@ -25,7 +25,6 @@ import java.util.Map; * A basic message abstraction that wraps a received FCP message. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class BaseMessage { diff --git a/src/net/pterodactylus/fcp/ClientGet.java b/src/net/pterodactylus/fcp/ClientGet.java index fef608d..303569e 100644 --- a/src/net/pterodactylus/fcp/ClientGet.java +++ b/src/net/pterodactylus/fcp/ClientGet.java @@ -23,7 +23,6 @@ package net.pterodactylus.fcp; * A “ClientGet” request is used for download files from the Freenet node. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class ClientGet extends FcpMessage { diff --git a/src/net/pterodactylus/fcp/ClientHello.java b/src/net/pterodactylus/fcp/ClientHello.java index 4f83922..b6cc900 100644 --- a/src/net/pterodactylus/fcp/ClientHello.java +++ b/src/net/pterodactylus/fcp/ClientHello.java @@ -24,7 +24,6 @@ package net.pterodactylus.fcp; * after calling {@link FcpConnection#connect()}. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class ClientHello extends FcpMessage { diff --git a/src/net/pterodactylus/fcp/ClientPut.java b/src/net/pterodactylus/fcp/ClientPut.java index f3d3d1d..5185deb 100644 --- a/src/net/pterodactylus/fcp/ClientPut.java +++ b/src/net/pterodactylus/fcp/ClientPut.java @@ -25,7 +25,6 @@ package net.pterodactylus.fcp; * disk ({@link UploadFrom#disk}) or by creating a redirect to another URI ({@link UploadFrom#redirect}). * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class ClientPut extends FcpMessage { diff --git a/src/net/pterodactylus/fcp/ClientPutComplexDir.java b/src/net/pterodactylus/fcp/ClientPutComplexDir.java index cb40da1..9560203 100644 --- a/src/net/pterodactylus/fcp/ClientPutComplexDir.java +++ b/src/net/pterodactylus/fcp/ClientPutComplexDir.java @@ -37,7 +37,6 @@ import net.pterodactylus.fcp.FileEntry.DirectFileEntry; * * @see FileEntry * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class ClientPutComplexDir extends FcpMessage { diff --git a/src/net/pterodactylus/fcp/ClientPutDiskDir.java b/src/net/pterodactylus/fcp/ClientPutDiskDir.java index 3a81451..540e088 100644 --- a/src/net/pterodactylus/fcp/ClientPutDiskDir.java +++ b/src/net/pterodactylus/fcp/ClientPutDiskDir.java @@ -24,7 +24,6 @@ package net.pterodactylus.fcp; * the disk to a single key. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class ClientPutDiskDir extends FcpMessage { diff --git a/src/net/pterodactylus/fcp/CloseConnectionDuplicateClientName.java b/src/net/pterodactylus/fcp/CloseConnectionDuplicateClientName.java index e36a4c7..f189436 100644 --- a/src/net/pterodactylus/fcp/CloseConnectionDuplicateClientName.java +++ b/src/net/pterodactylus/fcp/CloseConnectionDuplicateClientName.java @@ -23,8 +23,6 @@ package net.pterodactylus.fcp; * A “CloseConnectionDuplicateClientName” message. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id: CloseConnectionDuplicateClientName.java 712 2008-04-11 - * 09:50:44Z bombe $ */ public class CloseConnectionDuplicateClientName extends BaseMessage { diff --git a/src/net/pterodactylus/fcp/ConfigData.java b/src/net/pterodactylus/fcp/ConfigData.java index 990cbe6..4905457 100644 --- a/src/net/pterodactylus/fcp/ConfigData.java +++ b/src/net/pterodactylus/fcp/ConfigData.java @@ -24,7 +24,6 @@ package net.pterodactylus.fcp; * * @see GetConfig * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class ConfigData extends BaseMessage { diff --git a/src/net/pterodactylus/fcp/DSAGroup.java b/src/net/pterodactylus/fcp/DSAGroup.java index 4e501b2..e7031c0 100644 --- a/src/net/pterodactylus/fcp/DSAGroup.java +++ b/src/net/pterodactylus/fcp/DSAGroup.java @@ -27,7 +27,6 @@ import java.security.interfaces.DSAParams; * * @see DSAParams * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class DSAGroup { diff --git a/src/net/pterodactylus/fcp/DataFound.java b/src/net/pterodactylus/fcp/DataFound.java index 039626a..b1ffe64 100644 --- a/src/net/pterodactylus/fcp/DataFound.java +++ b/src/net/pterodactylus/fcp/DataFound.java @@ -25,7 +25,6 @@ package net.pterodactylus.fcp; * actual data, though. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class DataFound extends BaseMessage { diff --git a/src/net/pterodactylus/fcp/EndListPeerNotes.java b/src/net/pterodactylus/fcp/EndListPeerNotes.java index 1846999..f6deb7f 100644 --- a/src/net/pterodactylus/fcp/EndListPeerNotes.java +++ b/src/net/pterodactylus/fcp/EndListPeerNotes.java @@ -24,7 +24,6 @@ package net.pterodactylus.fcp; * messages. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class EndListPeerNotes extends BaseMessage { diff --git a/src/net/pterodactylus/fcp/EndListPeers.java b/src/net/pterodactylus/fcp/EndListPeers.java index 6e23341..f241aab 100644 --- a/src/net/pterodactylus/fcp/EndListPeers.java +++ b/src/net/pterodactylus/fcp/EndListPeers.java @@ -23,7 +23,6 @@ package net.pterodactylus.fcp; * This message marks the end of a list of “Peer” replies. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class EndListPeers extends BaseMessage { diff --git a/src/net/pterodactylus/fcp/EndListPersistentRequests.java b/src/net/pterodactylus/fcp/EndListPersistentRequests.java index 714306e..586dbac 100644 --- a/src/net/pterodactylus/fcp/EndListPersistentRequests.java +++ b/src/net/pterodactylus/fcp/EndListPersistentRequests.java @@ -24,7 +24,6 @@ package net.pterodactylus.fcp; * {@link PersistentGet} and {@link PersistentPut} requests. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class EndListPersistentRequests extends BaseMessage { diff --git a/src/net/pterodactylus/fcp/FCPPluginMessage.java b/src/net/pterodactylus/fcp/FCPPluginMessage.java index 43df7d6..b551b3f 100644 --- a/src/net/pterodactylus/fcp/FCPPluginMessage.java +++ b/src/net/pterodactylus/fcp/FCPPluginMessage.java @@ -24,7 +24,6 @@ package net.pterodactylus.fcp; * payload to a plugin. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class FCPPluginMessage extends FcpMessage { diff --git a/src/net/pterodactylus/fcp/FCPPluginReply.java b/src/net/pterodactylus/fcp/FCPPluginReply.java index 271b8d7..84faa54 100644 --- a/src/net/pterodactylus/fcp/FCPPluginReply.java +++ b/src/net/pterodactylus/fcp/FCPPluginReply.java @@ -26,7 +26,6 @@ import java.io.InputStream; * {@link FCPPluginMessage} message. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class FCPPluginReply extends BaseMessage { diff --git a/src/net/pterodactylus/fcp/FcpAdapter.java b/src/net/pterodactylus/fcp/FcpAdapter.java index eb67768..04798b1 100644 --- a/src/net/pterodactylus/fcp/FcpAdapter.java +++ b/src/net/pterodactylus/fcp/FcpAdapter.java @@ -21,9 +21,8 @@ package net.pterodactylus.fcp; /** * Adapter for {@link FcpListener}. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class FcpAdapter implements FcpListener { @@ -85,7 +84,7 @@ public class FcpAdapter implements FcpListener { /** * {@inheritDoc} - * + * * @see FcpListener#receivedNodeData(FcpConnection, NodeData) */ public void receivedNodeData(FcpConnection fcpConnection, NodeData nodeData) { @@ -94,7 +93,7 @@ public class FcpAdapter implements FcpListener { /** * {@inheritDoc} - * + * * @see FcpListener#receivedTestDDAReply(FcpConnection, TestDDAReply) */ public void receivedTestDDAReply(FcpConnection fcpConnection, TestDDAReply testDDAReply) { diff --git a/src/net/pterodactylus/fcp/FcpConnection.java b/src/net/pterodactylus/fcp/FcpConnection.java index d1a1be7..05d8815 100644 --- a/src/net/pterodactylus/fcp/FcpConnection.java +++ b/src/net/pterodactylus/fcp/FcpConnection.java @@ -36,9 +36,8 @@ import java.util.logging.Logger; /** * An FCP connection to a Freenet node. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class FcpConnection implements Closeable { @@ -75,7 +74,7 @@ public class FcpConnection implements Closeable { /** * Creates a new FCP connection to the freenet node running on localhost, * using the default port. - * + * * @throws UnknownHostException * if the hostname can not be resolved */ @@ -86,7 +85,7 @@ public class FcpConnection implements Closeable { /** * Creates a new FCP connection to the Freenet node running on the given * host, listening on the default port. - * + * * @param host * The hostname of the Freenet node * @throws UnknownHostException @@ -99,7 +98,7 @@ public class FcpConnection implements Closeable { /** * Creates a new FCP connection to the Freenet node running on the given * host, listening on the given port. - * + * * @param host * The hostname of the Freenet node * @param port @@ -114,7 +113,7 @@ public class FcpConnection implements Closeable { /** * Creates a new FCP connection to the Freenet node running at the given * address, listening on the default port. - * + * * @param address * The address of the Freenet node */ @@ -125,7 +124,7 @@ public class FcpConnection implements Closeable { /** * Creates a new FCP connection to the Freenet node running at the given * address, listening on the given port. - * + * * @param address * The address of the Freenet node * @param port @@ -142,7 +141,7 @@ public class FcpConnection implements Closeable { /** * Adds the given listener to the list of listeners. - * + * * @param fcpListener * The listener to add */ @@ -152,7 +151,7 @@ public class FcpConnection implements Closeable { /** * Removes the given listener from the list of listeners. - * + * * @param fcpListener * The listener to remove */ @@ -162,13 +161,13 @@ public class FcpConnection implements Closeable { /** * Notifies listeners that a “NodeHello” message was received. - * + * * @see FcpListener#receivedNodeHello(FcpConnection, NodeHello) * @param nodeHello * The “NodeHello” message */ private void fireReceivedNodeHello(NodeHello nodeHello) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedNodeHello(this, nodeHello); } } @@ -176,157 +175,157 @@ public class FcpConnection implements Closeable { /** * Notifies listeners that a “CloseConnectionDuplicateClientName” message * was received. - * + * * @see FcpListener#receivedCloseConnectionDuplicateClientName(FcpConnection, * CloseConnectionDuplicateClientName) * @param closeConnectionDuplicateClientName * The “CloseConnectionDuplicateClientName” message */ private void fireReceivedCloseConnectionDuplicateClientName(CloseConnectionDuplicateClientName closeConnectionDuplicateClientName) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedCloseConnectionDuplicateClientName(this, closeConnectionDuplicateClientName); } } /** * Notifies listeners that a “SSKKeypair” message was received. - * + * * @see FcpListener#receivedSSKKeypair(FcpConnection, SSKKeypair) * @param sskKeypair * The “SSKKeypair” message */ private void fireReceivedSSKKeypair(SSKKeypair sskKeypair) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedSSKKeypair(this, sskKeypair); } } /** * Notifies listeners that a “Peer” message was received. - * + * * @see FcpListener#receivedPeer(FcpConnection, Peer) * @param peer * The “Peer” message */ private void fireReceivedPeer(Peer peer) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedPeer(this, peer); } } /** * Notifies all listeners that an “EndListPeers” message was received. - * + * * @see FcpListener#receivedEndListPeers(FcpConnection, EndListPeers) * @param endListPeers * The “EndListPeers” message */ private void fireReceivedEndListPeers(EndListPeers endListPeers) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedEndListPeers(this, endListPeers); } } /** * Notifies all listeners that a “PeerNote” message was received. - * + * * @see FcpListener#receivedPeerNote(FcpConnection, PeerNote) * @param peerNote */ private void fireReceivedPeerNote(PeerNote peerNote) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedPeerNote(this, peerNote); } } /** * Notifies all listeners that an “EndListPeerNotes” message was received. - * + * * @see FcpListener#receivedEndListPeerNotes(FcpConnection, * EndListPeerNotes) * @param endListPeerNotes * The “EndListPeerNotes” message */ private void fireReceivedEndListPeerNotes(EndListPeerNotes endListPeerNotes) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedEndListPeerNotes(this, endListPeerNotes); } } /** * Notifies all listeners that a “PeerRemoved” message was received. - * + * * @see FcpListener#receivedPeerRemoved(FcpConnection, PeerRemoved) * @param peerRemoved * The “PeerRemoved” message */ private void fireReceivedPeerRemoved(PeerRemoved peerRemoved) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedPeerRemoved(this, peerRemoved); } } /** * Notifies all listeners that a “NodeData” message was received. - * + * * @see FcpListener#receivedNodeData(FcpConnection, NodeData) * @param nodeData * The “NodeData” message */ private void fireReceivedNodeData(NodeData nodeData) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedNodeData(this, nodeData); } } /** * Notifies all listeners that a “TestDDAReply” message was received. - * + * * @see FcpListener#receivedTestDDAReply(FcpConnection, TestDDAReply) * @param testDDAReply * The “TestDDAReply” message */ private void fireReceivedTestDDAReply(TestDDAReply testDDAReply) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedTestDDAReply(this, testDDAReply); } } /** * Notifies all listeners that a “TestDDAComplete” message was received. - * + * * @see FcpListener#receivedTestDDAComplete(FcpConnection, TestDDAComplete) * @param testDDAComplete * The “TestDDAComplete” message */ private void fireReceivedTestDDAComplete(TestDDAComplete testDDAComplete) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedTestDDAComplete(this, testDDAComplete); } } /** * Notifies all listeners that a “PersistentGet” message was received. - * + * * @see FcpListener#receivedPersistentGet(FcpConnection, PersistentGet) * @param persistentGet * The “PersistentGet” message */ private void fireReceivedPersistentGet(PersistentGet persistentGet) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedPersistentGet(this, persistentGet); } } /** * Notifies all listeners that a “PersistentPut” message was received. - * + * * @see FcpListener#receivedPersistentPut(FcpConnection, PersistentPut) * @param persistentPut * The “PersistentPut” message */ private void fireReceivedPersistentPut(PersistentPut persistentPut) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedPersistentPut(this, persistentPut); } } @@ -334,94 +333,94 @@ public class FcpConnection implements Closeable { /** * Notifies all listeners that a “EndListPersistentRequests” message was * received. - * + * * @see FcpListener#receivedEndListPersistentRequests(FcpConnection, * EndListPersistentRequests) * @param endListPersistentRequests * The “EndListPersistentRequests” message */ private void fireReceivedEndListPersistentRequests(EndListPersistentRequests endListPersistentRequests) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedEndListPersistentRequests(this, endListPersistentRequests); } } /** * Notifies all listeners that a “URIGenerated” message was received. - * + * * @see FcpListener#receivedURIGenerated(FcpConnection, URIGenerated) * @param uriGenerated * The “URIGenerated” message */ private void fireReceivedURIGenerated(URIGenerated uriGenerated) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedURIGenerated(this, uriGenerated); } } /** * Notifies all listeners that a “DataFound” message was received. - * + * * @see FcpListener#receivedDataFound(FcpConnection, DataFound) * @param dataFound * The “DataFound” message */ private void fireReceivedDataFound(DataFound dataFound) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedDataFound(this, dataFound); } } /** * Notifies all listeners that an “AllData” message was received. - * + * * @see FcpListener#receivedAllData(FcpConnection, AllData) * @param allData * The “AllData” message */ private void fireReceivedAllData(AllData allData) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedAllData(this, allData); } } /** * Notifies all listeners that a “SimpleProgress” message was received. - * + * * @see FcpListener#receivedSimpleProgress(FcpConnection, SimpleProgress) * @param simpleProgress * The “SimpleProgress” message */ private void fireReceivedSimpleProgress(SimpleProgress simpleProgress) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedSimpleProgress(this, simpleProgress); } } /** * Notifies all listeners that a “StartedCompression” message was received. - * + * * @see FcpListener#receivedStartedCompression(FcpConnection, * StartedCompression) * @param startedCompression * The “StartedCompression” message */ private void fireReceivedStartedCompression(StartedCompression startedCompression) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedStartedCompression(this, startedCompression); } } /** * Notifies all listeners that a “FinishedCompression” message was received. - * + * * @see FcpListener#receviedFinishedCompression(FcpConnection, * FinishedCompression) * @param finishedCompression * The “FinishedCompression” message */ private void fireReceivedFinishedCompression(FinishedCompression finishedCompression) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receviedFinishedCompression(this, finishedCompression); } } @@ -429,14 +428,14 @@ public class FcpConnection implements Closeable { /** * Notifies all listeners that an “UnknownPeerNoteType” message was * received. - * + * * @see FcpListener#receivedUnknownPeerNoteType(FcpConnection, * UnknownPeerNoteType) * @param unknownPeerNoteType * The “UnknownPeerNoteType” message */ private void fireReceivedUnknownPeerNoteType(UnknownPeerNoteType unknownPeerNoteType) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedUnknownPeerNoteType(this, unknownPeerNoteType); } } @@ -444,53 +443,53 @@ public class FcpConnection implements Closeable { /** * Notifies all listeners that an “UnknownNodeIdentifier” message was * received. - * + * * @see FcpListener#receivedUnknownNodeIdentifier(FcpConnection, * UnknownNodeIdentifier) * @param unknownNodeIdentifier * The “UnknownNodeIdentifier” message */ private void fireReceivedUnknownNodeIdentifier(UnknownNodeIdentifier unknownNodeIdentifier) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedUnknownNodeIdentifier(this, unknownNodeIdentifier); } } /** * Notifies all listeners that a “ConfigData” message was received. - * + * * @see FcpListener#receivedConfigData(FcpConnection, ConfigData) * @param configData * The “ConfigData” message */ private void fireReceivedConfigData(ConfigData configData) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedConfigData(this, configData); } } /** * Notifies all listeners that a “GetFailed” message was received. - * + * * @see FcpListener#receivedGetFailed(FcpConnection, GetFailed) * @param getFailed * The “GetFailed” message */ private void fireReceivedGetFailed(GetFailed getFailed) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedGetFailed(this, getFailed); } } /** * Notifies all listeners that a “PutFailed” message was received. - * + * * @see FcpListener#receivedPutFailed(FcpConnection, PutFailed) * @param putFailed * The “PutFailed” message */ private void fireReceivedPutFailed(PutFailed putFailed) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedPutFailed(this, putFailed); } } @@ -498,28 +497,28 @@ public class FcpConnection implements Closeable { /** * Notifies all listeners that an “IdentifierCollision” message was * received. - * + * * @see FcpListener#receivedIdentifierCollision(FcpConnection, * IdentifierCollision) * @param identifierCollision * The “IdentifierCollision” message */ private void fireReceivedIdentifierCollision(IdentifierCollision identifierCollision) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedIdentifierCollision(this, identifierCollision); } } /** * Notifies all listeners that an “PersistentPutDir” message was received. - * + * * @see FcpListener#receivedPersistentPutDir(FcpConnection, * PersistentPutDir) * @param persistentPutDir * The “PersistentPutDir” message */ private void fireReceivedPersistentPutDir(PersistentPutDir persistentPutDir) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedPersistentPutDir(this, persistentPutDir); } } @@ -527,54 +526,54 @@ public class FcpConnection implements Closeable { /** * Notifies all listeners that a “PersistentRequestRemoved” message was * received. - * + * * @see FcpListener#receivedPersistentRequestRemoved(FcpConnection, * PersistentRequestRemoved) * @param persistentRequestRemoved * The “PersistentRequestRemoved” message */ private void fireReceivedPersistentRequestRemoved(PersistentRequestRemoved persistentRequestRemoved) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedPersistentRequestRemoved(this, persistentRequestRemoved); } } /** * Notifies all listeners that a “SubscribedUSKUpdate” message was received. - * + * * @see FcpListener#receivedSubscribedUSKUpdate(FcpConnection, * SubscribedUSKUpdate) * @param subscribedUSKUpdate * The “SubscribedUSKUpdate” message */ private void fireReceivedSubscribedUSKUpdate(SubscribedUSKUpdate subscribedUSKUpdate) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedSubscribedUSKUpdate(this, subscribedUSKUpdate); } } /** * Notifies all listeners that a “PluginInfo” message was received. - * + * * @see FcpListener#receivedPluginInfo(FcpConnection, PluginInfo) * @param pluginInfo * The “PluginInfo” message */ private void fireReceivedPluginInfo(PluginInfo pluginInfo) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedPluginInfo(this, pluginInfo); } } /** * Notifies all listeners that an “FCPPluginReply” message was received. - * + * * @see FcpListener#receivedFCPPluginReply(FcpConnection, FCPPluginReply) * @param fcpPluginReply * The “FCPPluginReply” message */ private void fireReceivedFCPPluginReply(FCPPluginReply fcpPluginReply) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedFCPPluginReply(this, fcpPluginReply); } } @@ -582,80 +581,80 @@ public class FcpConnection implements Closeable { /** * Notifies all listeners that a “PersistentRequestModified” message was * received. - * + * * @see FcpListener#receivedPersistentRequestModified(FcpConnection, * PersistentRequestModified) * @param persistentRequestModified * The “PersistentRequestModified” message */ private void fireReceivedPersistentRequestModified(PersistentRequestModified persistentRequestModified) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedPersistentRequestModified(this, persistentRequestModified); } } /** * Notifies all listeners that a “PutSuccessful” message was received. - * + * * @see FcpListener#receivedPutSuccessful(FcpConnection, PutSuccessful) * @param putSuccessful * The “PutSuccessful” message */ private void fireReceivedPutSuccessful(PutSuccessful putSuccessful) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedPutSuccessful(this, putSuccessful); } } /** * Notifies all listeners that a “PutFetchable” message was received. - * + * * @see FcpListener#receivedPutFetchable(FcpConnection, PutFetchable) * @param putFetchable * The “PutFetchable” message */ private void fireReceivedPutFetchable(PutFetchable putFetchable) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedPutFetchable(this, putFetchable); } } /** * Notifies all listeners that a “ProtocolError” message was received. - * + * * @see FcpListener#receivedProtocolError(FcpConnection, ProtocolError) * @param protocolError * The “ProtocolError” message */ private void fireReceivedProtocolError(ProtocolError protocolError) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedProtocolError(this, protocolError); } } /** * Notifies all registered listeners that a message has been received. - * + * * @see FcpListener#receivedMessage(FcpConnection, FcpMessage) * @param fcpMessage * The message that was received */ private void fireMessageReceived(FcpMessage fcpMessage) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.receivedMessage(this, fcpMessage); } } /** * Notifies all listeners that the connection to the node was closed. - * + * * @param throwable * The exception that caused the disconnect, or null * if there was no exception * @see FcpListener#connectionClosed(FcpConnection, Throwable) */ private void fireConnectionClosed(Throwable throwable) { - for (FcpListener fcpListener: fcpListeners) { + for (FcpListener fcpListener : fcpListeners) { fcpListener.connectionClosed(this, throwable); } } @@ -666,7 +665,7 @@ public class FcpConnection implements Closeable { /** * Connects to the node. - * + * * @throws IOException * if an I/O error occurs * @throws IllegalStateException @@ -686,7 +685,7 @@ public class FcpConnection implements Closeable { /** * Disconnects from the node. If there is no connection to the node, this * method does nothing. - * + * * @deprecated Use {@link #close()} instead */ @Deprecated @@ -704,7 +703,7 @@ public class FcpConnection implements Closeable { /** * Sends the given FCP message. - * + * * @param fcpMessage * The FCP message to send * @throws IOException @@ -722,7 +721,7 @@ public class FcpConnection implements Closeable { /** * Handles the given message, notifying listeners. This message should only * be called by {@link FcpConnectionHandler}. - * + * * @param fcpMessage * The received message */ @@ -819,7 +818,7 @@ public class FcpConnection implements Closeable { /** * Handles a disconnect from the node. - * + * * @param throwable * The exception that caused the disconnect, or null * if there was no exception @@ -842,7 +841,7 @@ public class FcpConnection implements Closeable { /** * Incremets the counter in {@link #incomingMessageStatistics} by 1 * for the given message name. - * + * * @param name * The name of the message to count */ @@ -857,7 +856,7 @@ public class FcpConnection implements Closeable { /** * Returns a limited input stream from the node’s input stream. - * + * * @param dataLength * The length of the stream * @return The limited input stream @@ -872,9 +871,8 @@ public class FcpConnection implements Closeable { /** * A wrapper around an {@link InputStream} that only supplies a limit number * of bytes from the underlying input stream. - * - * @author David Roden - * @version $Id$ + * + * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ private static class LimitedInputStream extends FilterInputStream { @@ -884,7 +882,7 @@ public class FcpConnection implements Closeable { /** * Creates a new LimitedInputStream that supplies at most * length bytes from the given input stream. - * + * * @param inputStream * The input stream * @param length @@ -949,7 +947,7 @@ public class FcpConnection implements Closeable { /** * {@inheritDoc} This method does nothing, as {@link #mark(int)} and * {@link #reset()} are not supported. - * + * * @see java.io.FilterInputStream#mark(int) */ @Override @@ -959,7 +957,7 @@ public class FcpConnection implements Closeable { /** * {@inheritDoc} - * + * * @see java.io.FilterInputStream#markSupported() * @return false */ @@ -971,7 +969,7 @@ public class FcpConnection implements Closeable { /** * {@inheritDoc} This method does nothing, as {@link #mark(int)} and * {@link #reset()} are not supported. - * + * * @see java.io.FilterInputStream#reset() */ @Override @@ -982,7 +980,7 @@ public class FcpConnection implements Closeable { /** * Consumes the input stream, i.e. read all bytes until the limit is * reached. - * + * * @throws IOException * if an I/O error occurs */ diff --git a/src/net/pterodactylus/fcp/FcpConnectionHandler.java b/src/net/pterodactylus/fcp/FcpConnectionHandler.java index d5784bb..2c37e5e 100644 --- a/src/net/pterodactylus/fcp/FcpConnectionHandler.java +++ b/src/net/pterodactylus/fcp/FcpConnectionHandler.java @@ -26,9 +26,8 @@ import java.nio.charset.Charset; /** * Handles an FCP connection to a node. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ class FcpConnectionHandler implements Runnable { @@ -47,7 +46,7 @@ class FcpConnectionHandler implements Runnable { /** * Creates a new connection handler that operates on the given connection * and input stream. - * + * * @param fcpConnection * The underlying FCP connection * @param remoteInputStream @@ -121,7 +120,7 @@ class FcpConnectionHandler implements Runnable { /** * Reads bytes from {@link #remoteInputStream} until ‘\r’ or ‘\n’ are * encountered and decodes the read bytes using UTF-8. - * + * * @return The decoded line * @throws IOException * if an I/O error occurs diff --git a/src/net/pterodactylus/fcp/FcpKeyPair.java b/src/net/pterodactylus/fcp/FcpKeyPair.java index 44ccb5d..8c3fef4 100644 --- a/src/net/pterodactylus/fcp/FcpKeyPair.java +++ b/src/net/pterodactylus/fcp/FcpKeyPair.java @@ -23,7 +23,6 @@ package net.pterodactylus.fcp; * Container for an SSK keypair. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class FcpKeyPair { diff --git a/src/net/pterodactylus/fcp/FcpListener.java b/src/net/pterodactylus/fcp/FcpListener.java index 09a5f2a..5b5149a 100644 --- a/src/net/pterodactylus/fcp/FcpListener.java +++ b/src/net/pterodactylus/fcp/FcpListener.java @@ -23,15 +23,14 @@ import java.util.EventListener; /** * Interface for objects that want to be notified on certain FCP events. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public interface FcpListener extends EventListener { /** * Notifies a listener that a “NodeHello” message was received. - * + * * @param fcpConnection * The connection that received the message * @param nodeHello @@ -42,7 +41,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that a “CloseConnectionDuplicateClientName” message * was received. - * + * * @param fcpConnection * The connection that received the message * @param closeConnectionDuplicateClientName @@ -52,7 +51,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that a “SSKKeypair” message was received. - * + * * @param fcpConnection * The connection that received themessage * @param sskKeypair @@ -62,7 +61,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that a “Peer” message was received. - * + * * @param fcpConnection * The connection that received the message * @param peer @@ -72,7 +71,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that an “EndListPeers” message was received. - * + * * @param fcpConnection * The connection that recevied the message * @param endListPeers @@ -82,7 +81,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that a “PeerNote” message was received. - * + * * @param fcpConnection * The connection that received the message * @param peerNote @@ -92,7 +91,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that an “EndListPeerNotes” message was received. - * + * * @param fcpConnection * The connection that received the message * @param endListPeerNotes @@ -102,7 +101,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that a “PeerRemoved” message was received. - * + * * @param fcpConnection * The connection that received the message * @param peerRemoved @@ -112,7 +111,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that a “NodeData” message was received. - * + * * @param fcpConnection * The connection that received the message * @param nodeData @@ -122,7 +121,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that a “TestDDAReply” message was received. - * + * * @param fcpConnection * The connection that received the message * @param testDDAReply @@ -132,7 +131,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that a “TestDDAComplete” was received. - * + * * @param fcpConnection * The connection that received the message * @param testDDAComplete @@ -142,7 +141,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that a “PersistentGet” was received. - * + * * @param fcpConnection * The connection that received the message * @param persistentGet @@ -152,7 +151,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that a “PersistentPut” was received. - * + * * @param fcpConnection * The connection that received the message * @param persistentPut @@ -162,7 +161,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that a “EndListPersistentRequests” was received. - * + * * @param fcpConnection * The connection that received the message * @param endListPersistentRequests @@ -172,7 +171,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that a “URIGenerated” was received. - * + * * @param fcpConnection * The connection that received the message * @param uriGenerated @@ -182,7 +181,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that a “DataFound” was received. - * + * * @param fcpConnection * The connection that received the message * @param dataFound @@ -192,7 +191,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that an “AllData” was received. - * + * * @param fcpConnection * The connection that received the message * @param allData @@ -202,7 +201,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that a “SimpleProgress” was received. - * + * * @param fcpConnection * The connection that received the message * @param simpleProgress @@ -212,7 +211,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that a “StartedCompression” was received. - * + * * @param fcpConnection * The connection that received the message * @param startedCompression @@ -222,7 +221,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that a “FinishedCompression” was received. - * + * * @param fcpConnection * The connection that received the message * @param finishedCompression @@ -232,7 +231,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that an “UnknownPeerNoteType” was received. - * + * * @param fcpConnection * The connection that received the message * @param unknownPeerNoteType @@ -242,7 +241,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that a “UnknownNodeIdentifier” message was received. - * + * * @param fcpConnection * The connection that received the message * @param unknownNodeIdentifier @@ -252,7 +251,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that a “ConfigData” message was received. - * + * * @param fcpConnection * The connection that received the message * @param configData @@ -262,7 +261,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that a “GetFailed” message was recevied. - * + * * @param fcpConnection * The connection that received the message * @param getFailed @@ -272,7 +271,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that a “PutFailed” message was received. - * + * * @param fcpConnection * The connection that received the message * @param putFailed @@ -282,7 +281,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that an “IdentifierCollision” message was receied. - * + * * @param fcpConnection * The connection that received the message * @param identifierCollision @@ -292,7 +291,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that a “PersistentPutDir” message was received. - * + * * @param fcpConnection * The connection that received the message * @param persistentPutDir @@ -303,7 +302,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that a “PersistentRequestRemoved” message was * received. - * + * * @param fcpConnection * The connection that received the message * @param persistentRequestRemoved @@ -313,7 +312,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that a “SubscribedUSKUpdate” message was received. - * + * * @param fcpConnection * The connection that recevied the message * @param subscribedUSKUpdate @@ -323,7 +322,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that a “PluginInfo” message was received. - * + * * @param fcpConnection * The connection that received the message * @param pluginInfo @@ -333,7 +332,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that an “FCPPluginReply“ message was received. - * + * * @param fcpConnection * The connection that received the message * @param fcpPluginReply @@ -344,7 +343,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that a “PersistentRequestModified” message was * received. - * + * * @param fcpConnection * The connection that received the message * @param persistentRequestModified @@ -354,7 +353,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that a “PutSuccessful” message was received. - * + * * @param fcpConnection * The connection that received the message * @param putSuccessful @@ -364,7 +363,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that a “PutFetchable” message was received. - * + * * @param fcpConnection * The connection that received the message * @param putFetchable @@ -374,7 +373,7 @@ public interface FcpListener extends EventListener { /** * Notifies a listener that a “ProtocolError” was received. - * + * * @param fcpConnection * The connection that received the message * @param protocolError @@ -386,7 +385,7 @@ public interface FcpListener extends EventListener { * Notifies a listener that a message has been received. This method is only * called if {@link FcpConnection#handleMessage(FcpMessage)} does not * recognize the message. Should that ever happen, please file a bug report! - * + * * @param fcpConnection * The connection that received the message * @param fcpMessage @@ -398,7 +397,7 @@ public interface FcpListener extends EventListener { * Notifies a listener that a connection was closed. A closed connection can * be reestablished by calling {@link FcpConnection#connect()} on the same * object again. - * + * * @param fcpConnection * The connection that was closed. * @param throwable diff --git a/src/net/pterodactylus/fcp/FcpMessage.java b/src/net/pterodactylus/fcp/FcpMessage.java index ff65a98..96e5f65 100644 --- a/src/net/pterodactylus/fcp/FcpMessage.java +++ b/src/net/pterodactylus/fcp/FcpMessage.java @@ -32,9 +32,8 @@ import java.util.Map.Entry; * An FCP message. FCP messages consist of a name, an arbitrary amount of * “fields” (i.e. key-value pairs), a message end marker, and optional payload * data that follows the marker. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class FcpMessage implements Iterable { @@ -52,7 +51,7 @@ public class FcpMessage implements Iterable { /** * Creates a new FCP message with the given name. - * + * * @param name * The name of the FCP message */ @@ -64,7 +63,7 @@ public class FcpMessage implements Iterable { * Creates a new FCP message with the given name and the given payload input * stream. The payload input stream is not read until the message is sent to * the node using {@link FcpConnection#sendMessage(FcpMessage)}. - * + * * @param name * The name of the message * @param payloadInputStream @@ -77,7 +76,7 @@ public class FcpMessage implements Iterable { /** * Returns the name of the message. - * + * * @return The name of the message */ public String getName() { @@ -86,7 +85,7 @@ public class FcpMessage implements Iterable { /** * Checks whether this message has a field with the given name. - * + * * @param field * The name of the field to check for * @return true if the message has a field with the given @@ -99,7 +98,7 @@ public class FcpMessage implements Iterable { /** * Sets the field with the given name to the given value. If the field * already exists in this message it is overwritten. - * + * * @param field * The name of the field * @param value @@ -114,7 +113,7 @@ public class FcpMessage implements Iterable { /** * Returns the value of the given field. - * + * * @param field * The name of the field * @return The value of the field, or null if there is no @@ -126,7 +125,7 @@ public class FcpMessage implements Iterable { /** * Returns all fields of this message. - * + * * @return All fields of this message */ public Map getFields() { @@ -142,7 +141,7 @@ public class FcpMessage implements Iterable { /** * Sets the payload input stream of the message. - * + * * @param payloadInputStream * The payload input stream */ @@ -156,7 +155,7 @@ public class FcpMessage implements Iterable { * the payload is written to the given output stream after the message as * well. That means that this method can only be called once because on the * second invocation the payload input stream could not be read (again). - * + * * @param outputStream * The output stream to write the message to * @throws IOException @@ -182,7 +181,7 @@ public class FcpMessage implements Iterable { /** * Writes the given line (followed by {@link #LINEFEED} to the given output * stream, using UTF-8 as encoding. - * + * * @param outputStream * The output stream to write to * @param line diff --git a/src/net/pterodactylus/fcp/FcpTest.java b/src/net/pterodactylus/fcp/FcpTest.java index 9e0c0c5..93a3637 100644 --- a/src/net/pterodactylus/fcp/FcpTest.java +++ b/src/net/pterodactylus/fcp/FcpTest.java @@ -25,9 +25,8 @@ import junit.framework.TestCase; /** * Tests various commands and the FCP connection. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class FcpTest extends TestCase { @@ -62,7 +61,7 @@ public class FcpTest extends TestCase { /** * Generates an SSK key pair. - * + * * @throws IOException * if an I/O error occurs * @throws InterruptedException diff --git a/src/net/pterodactylus/fcp/FcpUtils.java b/src/net/pterodactylus/fcp/FcpUtils.java index cf8b8d3..a785924 100644 --- a/src/net/pterodactylus/fcp/FcpUtils.java +++ b/src/net/pterodactylus/fcp/FcpUtils.java @@ -19,8 +19,13 @@ package net.pterodactylus.fcp; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; import java.io.Closeable; import java.io.EOFException; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -31,7 +36,7 @@ import java.util.concurrent.atomic.AtomicLong; /** * Helper class with utility methods for the FCP protocol. * - * @author David Roden + * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class FcpUtils { @@ -77,7 +82,7 @@ public class FcpUtils { */ public static String encodeMultiIntegerField(int[] values) { StringBuilder encodedField = new StringBuilder(); - for (int value: values) { + for (int value : values) { if (encodedField.length() > 0) { encodedField.append(';'); } @@ -96,7 +101,7 @@ public class FcpUtils { */ public static String encodeMultiStringField(String[] values) { StringBuilder encodedField = new StringBuilder(); - for (String value: values) { + for (String value : values) { if (encodedField.length() > 0) { encodedField.append(';'); } @@ -268,4 +273,198 @@ public class FcpUtils { } } + /** + * This input stream stores the content of another input stream either in a + * file or in memory, depending on the length of the input stream. + * + * @author David ‘Bombe’ Roden <bombe@freenetproject.org> + */ + public static class TempInputStream extends InputStream { + + /** The default maximum lenght for in-memory storage. */ + public static final long MAX_LENGTH_MEMORY = 65536; + + /** The temporary file to read from. */ + private final File tempFile; + + /** The input stream that reads from the file. */ + private final InputStream fileInputStream; + + /** The input stream that reads from memory. */ + private final InputStream memoryInputStream; + + /** + * Creates a new temporary input stream that stores the given input + * stream in a temporary file. + * + * @param originalInputStream + * The original input stream + * @throws IOException + * if an I/O error occurs + */ + public TempInputStream(InputStream originalInputStream) throws IOException { + this(originalInputStream, -1); + } + + /** + * Creates a new temporary input stream that stores the given input + * stream in memory if it is shorter than {@link #MAX_LENGTH_MEMORY}, + * otherwise it is stored in a file. + * + * @param originalInputStream + * The original input stream + * @param length + * The length of the input stream + * @throws IOException + * if an I/O error occurs + */ + public TempInputStream(InputStream originalInputStream, long length) throws IOException { + this(originalInputStream, length, MAX_LENGTH_MEMORY); + } + + /** + * Creates a new temporary input stream that stores the given input + * stream in memory if it is shorter than maxMemoryLength, + * otherwise it is stored in a file. + * + * @param originalInputStream + * The original input stream + * @param length + * The length of the input stream + * @param maxMemoryLength + * The maximum length to store in memory + * @throws IOException + * if an I/O error occurs + */ + public TempInputStream(InputStream originalInputStream, long length, long maxMemoryLength) throws IOException { + if ((length > -1) && (length <= maxMemoryLength)) { + ByteArrayOutputStream memoryOutputStream = new ByteArrayOutputStream((int) length); + try { + FcpUtils.copy(originalInputStream, memoryOutputStream, length, (int) length); + } finally { + memoryOutputStream.close(); + } + tempFile = null; + fileInputStream = null; + memoryInputStream = new ByteArrayInputStream(memoryOutputStream.toByteArray()); + } else { + tempFile = File.createTempFile("temp-", ".bin"); + tempFile.deleteOnExit(); + FileOutputStream fileOutputStream = null; + try { + fileOutputStream = new FileOutputStream(tempFile); + FcpUtils.copy(originalInputStream, fileOutputStream); + fileInputStream = new FileInputStream(tempFile); + } finally { + FcpUtils.close(fileOutputStream); + } + memoryInputStream = null; + } + } + + /** + * {@inheritDoc} + */ + @Override + public int available() throws IOException { + if (memoryInputStream != null) { + return memoryInputStream.available(); + } + return fileInputStream.available(); + } + + /** + * {@inheritDoc} + */ + @Override + public void close() throws IOException { + if (memoryInputStream != null) { + memoryInputStream.close(); + return; + } + tempFile.delete(); + fileInputStream.close(); + } + + /** + * {@inheritDoc} + */ + @Override + public synchronized void mark(int readlimit) { + if (memoryInputStream != null) { + memoryInputStream.mark(readlimit); + return; + } + fileInputStream.mark(readlimit); + } + + /** + * {@inheritDoc} + */ + @Override + public boolean markSupported() { + if (memoryInputStream != null) { + return memoryInputStream.markSupported(); + } + return fileInputStream.markSupported(); + } + + /** + * {@inheritDoc} + */ + @Override + public int read() throws IOException { + if (memoryInputStream != null) { + return memoryInputStream.read(); + } + return fileInputStream.read(); + } + + /** + * {@inheritDoc} + */ + @Override + public int read(byte[] b) throws IOException { + if (memoryInputStream != null) { + return memoryInputStream.read(b); + } + return fileInputStream.read(b); + } + + /** + * {@inheritDoc} + */ + @Override + public int read(byte[] b, int off, int len) throws IOException { + if (memoryInputStream != null) { + return memoryInputStream.read(b, off, len); + } + return fileInputStream.read(b, off, len); + } + + /** + * {@inheritDoc} + */ + @Override + public synchronized void reset() throws IOException { + if (memoryInputStream != null) { + memoryInputStream.reset(); + return; + } + fileInputStream.reset(); + } + + /** + * {@inheritDoc} + */ + @Override + public long skip(long n) throws IOException { + if (memoryInputStream != null) { + return memoryInputStream.skip(n); + } + return fileInputStream.skip(n); + } + + } + } diff --git a/src/net/pterodactylus/fcp/FileEntry.java b/src/net/pterodactylus/fcp/FileEntry.java index 058cc82..baa0b6d 100644 --- a/src/net/pterodactylus/fcp/FileEntry.java +++ b/src/net/pterodactylus/fcp/FileEntry.java @@ -28,7 +28,6 @@ import java.util.Map; * * @see ClientPutComplexDir#addFileEntry(FileEntry) * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public abstract class FileEntry { @@ -114,7 +113,6 @@ public abstract class FileEntry { * {@link ClientPutComplexDir} message. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ static class DirectFileEntry extends FileEntry { @@ -191,7 +189,6 @@ public abstract class FileEntry { * A file entry for a file that should be uploaded from the disk. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ static class DiskFileEntry extends FileEntry { @@ -262,7 +259,6 @@ public abstract class FileEntry { * A file entry for a file that redirects to another URI. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ static class RedirectFileEntry extends FileEntry { diff --git a/src/net/pterodactylus/fcp/FinishedCompression.java b/src/net/pterodactylus/fcp/FinishedCompression.java index 20038b6..25ce471 100644 --- a/src/net/pterodactylus/fcp/FinishedCompression.java +++ b/src/net/pterodactylus/fcp/FinishedCompression.java @@ -23,8 +23,7 @@ package net.pterodactylus.fcp; * A “FinishedCompression” message signals the client that the compression of * the request data has been finished. * - * @author David Roden <droden@gmail.com> - * @version $Id$ + * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class FinishedCompression extends BaseMessage { diff --git a/src/net/pterodactylus/fcp/GenerateSSK.java b/src/net/pterodactylus/fcp/GenerateSSK.java index 910362e..024bc8d 100644 --- a/src/net/pterodactylus/fcp/GenerateSSK.java +++ b/src/net/pterodactylus/fcp/GenerateSSK.java @@ -24,7 +24,6 @@ package net.pterodactylus.fcp; * key pair. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class GenerateSSK extends FcpMessage { diff --git a/src/net/pterodactylus/fcp/GetConfig.java b/src/net/pterodactylus/fcp/GetConfig.java index c90b989..4b8d375 100644 --- a/src/net/pterodactylus/fcp/GetConfig.java +++ b/src/net/pterodactylus/fcp/GetConfig.java @@ -24,7 +24,6 @@ package net.pterodactylus.fcp; * client. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class GetConfig extends FcpMessage { diff --git a/src/net/pterodactylus/fcp/GetFailed.java b/src/net/pterodactylus/fcp/GetFailed.java index cd14e96..161da9e 100644 --- a/src/net/pterodactylus/fcp/GetFailed.java +++ b/src/net/pterodactylus/fcp/GetFailed.java @@ -30,7 +30,6 @@ import java.util.Map.Entry; * request will be sent. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class GetFailed extends BaseMessage { diff --git a/src/net/pterodactylus/fcp/GetNode.java b/src/net/pterodactylus/fcp/GetNode.java index 778c308..eefa016 100644 --- a/src/net/pterodactylus/fcp/GetNode.java +++ b/src/net/pterodactylus/fcp/GetNode.java @@ -24,7 +24,6 @@ package net.pterodactylus.fcp; * optionally including private and volatile data. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class GetNode extends FcpMessage { diff --git a/src/net/pterodactylus/fcp/GetPluginInfo.java b/src/net/pterodactylus/fcp/GetPluginInfo.java index bae14da..7751268 100644 --- a/src/net/pterodactylus/fcp/GetPluginInfo.java +++ b/src/net/pterodactylus/fcp/GetPluginInfo.java @@ -24,7 +24,6 @@ package net.pterodactylus.fcp; * node, which will response with a {@link PluginInfo} message. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class GetPluginInfo extends FcpMessage { diff --git a/src/net/pterodactylus/fcp/GetRequestStatus.java b/src/net/pterodactylus/fcp/GetRequestStatus.java index 3941df6..27ca9b4 100644 --- a/src/net/pterodactylus/fcp/GetRequestStatus.java +++ b/src/net/pterodactylus/fcp/GetRequestStatus.java @@ -25,7 +25,6 @@ package net.pterodactylus.fcp; * completed {@link ClientGet} with a return type of {@link ReturnType#direct}. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class GetRequestStatus extends FcpMessage { diff --git a/src/net/pterodactylus/fcp/IdentifierCollision.java b/src/net/pterodactylus/fcp/IdentifierCollision.java index 67ec01c..e285e77 100644 --- a/src/net/pterodactylus/fcp/IdentifierCollision.java +++ b/src/net/pterodactylus/fcp/IdentifierCollision.java @@ -24,7 +24,6 @@ package net.pterodactylus.fcp; * chosen for a request is already existing. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class IdentifierCollision extends BaseMessage { diff --git a/src/net/pterodactylus/fcp/ListPeer.java b/src/net/pterodactylus/fcp/ListPeer.java index 7376b85..c338dc9 100644 --- a/src/net/pterodactylus/fcp/ListPeer.java +++ b/src/net/pterodactylus/fcp/ListPeer.java @@ -23,7 +23,6 @@ package net.pterodactylus.fcp; * The “ListPeer” request asks the node about the details of a given peer. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class ListPeer extends FcpMessage { diff --git a/src/net/pterodactylus/fcp/ListPeerNotes.java b/src/net/pterodactylus/fcp/ListPeerNotes.java index f43edef..c63ee27 100644 --- a/src/net/pterodactylus/fcp/ListPeerNotes.java +++ b/src/net/pterodactylus/fcp/ListPeerNotes.java @@ -24,7 +24,6 @@ package net.pterodactylus.fcp; * entered for a node. Note that notes are only supported for darknet nodes. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class ListPeerNotes extends FcpMessage { diff --git a/src/net/pterodactylus/fcp/ListPeers.java b/src/net/pterodactylus/fcp/ListPeers.java index acd2b1f..00b7162 100644 --- a/src/net/pterodactylus/fcp/ListPeers.java +++ b/src/net/pterodactylus/fcp/ListPeers.java @@ -23,7 +23,6 @@ package net.pterodactylus.fcp; * The “ListPeer” requests asks the node for a list of all peers it has. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class ListPeers extends FcpMessage { diff --git a/src/net/pterodactylus/fcp/ListPersistentRequests.java b/src/net/pterodactylus/fcp/ListPersistentRequests.java index b8908ba..2d09924 100644 --- a/src/net/pterodactylus/fcp/ListPersistentRequests.java +++ b/src/net/pterodactylus/fcp/ListPersistentRequests.java @@ -25,7 +25,6 @@ package net.pterodactylus.fcp; * on your {@link WatchGlobal} status. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class ListPersistentRequests extends FcpMessage { diff --git a/src/net/pterodactylus/fcp/ModifyConfig.java b/src/net/pterodactylus/fcp/ModifyConfig.java index 8f46d8d..25dbab9 100644 --- a/src/net/pterodactylus/fcp/ModifyConfig.java +++ b/src/net/pterodactylus/fcp/ModifyConfig.java @@ -23,7 +23,6 @@ package net.pterodactylus.fcp; * The “ModifyConfig” message is used to change the node’s configuration. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class ModifyConfig extends FcpMessage { diff --git a/src/net/pterodactylus/fcp/ModifyPeer.java b/src/net/pterodactylus/fcp/ModifyPeer.java index 6841cab..c4d7994 100644 --- a/src/net/pterodactylus/fcp/ModifyPeer.java +++ b/src/net/pterodactylus/fcp/ModifyPeer.java @@ -23,7 +23,6 @@ package net.pterodactylus.fcp; * The “ModifyPeer” request lets you modify certain properties of a peer. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class ModifyPeer extends FcpMessage { diff --git a/src/net/pterodactylus/fcp/ModifyPeerNote.java b/src/net/pterodactylus/fcp/ModifyPeerNote.java index b1cd119..a48ddef 100644 --- a/src/net/pterodactylus/fcp/ModifyPeerNote.java +++ b/src/net/pterodactylus/fcp/ModifyPeerNote.java @@ -23,7 +23,6 @@ package net.pterodactylus.fcp; * The “ModifyPeerNote” command modifies a peer note. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class ModifyPeerNote extends FcpMessage { diff --git a/src/net/pterodactylus/fcp/ModifyPersistentRequest.java b/src/net/pterodactylus/fcp/ModifyPersistentRequest.java index 2a4bc3c..23e72e6 100644 --- a/src/net/pterodactylus/fcp/ModifyPersistentRequest.java +++ b/src/net/pterodactylus/fcp/ModifyPersistentRequest.java @@ -24,7 +24,6 @@ package net.pterodactylus.fcp; * persistent request while it is running. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class ModifyPersistentRequest extends FcpMessage { diff --git a/src/net/pterodactylus/fcp/NodeData.java b/src/net/pterodactylus/fcp/NodeData.java index ab4845a..6e2d25a 100644 --- a/src/net/pterodactylus/fcp/NodeData.java +++ b/src/net/pterodactylus/fcp/NodeData.java @@ -23,7 +23,6 @@ package net.pterodactylus.fcp; * The “NodeData” contains the noderef of the node, along with additional data. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class NodeData extends BaseMessage { diff --git a/src/net/pterodactylus/fcp/NodeHello.java b/src/net/pterodactylus/fcp/NodeHello.java index e4665e0..52e5400 100644 --- a/src/net/pterodactylus/fcp/NodeHello.java +++ b/src/net/pterodactylus/fcp/NodeHello.java @@ -22,8 +22,7 @@ package net.pterodactylus.fcp; /** * Some convenience methods for parsing a “NodeHello” message from the node. * - * @author David Roden - * @version $Id$ + * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class NodeHello extends BaseMessage { diff --git a/src/net/pterodactylus/fcp/NodeRef.java b/src/net/pterodactylus/fcp/NodeRef.java index d85c3d4..3e7a4ce 100644 --- a/src/net/pterodactylus/fcp/NodeRef.java +++ b/src/net/pterodactylus/fcp/NodeRef.java @@ -24,7 +24,6 @@ package net.pterodactylus.fcp; * establish a trusted and secure connection to the node. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class NodeRef { diff --git a/src/net/pterodactylus/fcp/Peer.java b/src/net/pterodactylus/fcp/Peer.java index f7d3378..9fd9665 100644 --- a/src/net/pterodactylus/fcp/Peer.java +++ b/src/net/pterodactylus/fcp/Peer.java @@ -23,7 +23,6 @@ package net.pterodactylus.fcp; * The “Peer” reply by the node contains information about a peer. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class Peer extends BaseMessage { diff --git a/src/net/pterodactylus/fcp/PeerNote.java b/src/net/pterodactylus/fcp/PeerNote.java index f139973..aeeeb1e 100644 --- a/src/net/pterodactylus/fcp/PeerNote.java +++ b/src/net/pterodactylus/fcp/PeerNote.java @@ -23,8 +23,7 @@ package net.pterodactylus.fcp; * The “PeerNote” message contains a private note that has been entered for a * darknet peer. * - * @author David Roden - * @version $Id$ + * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class PeerNote extends BaseMessage { diff --git a/src/net/pterodactylus/fcp/PeerRemoved.java b/src/net/pterodactylus/fcp/PeerRemoved.java index d1e724a..cb457df 100644 --- a/src/net/pterodactylus/fcp/PeerRemoved.java +++ b/src/net/pterodactylus/fcp/PeerRemoved.java @@ -23,7 +23,6 @@ package net.pterodactylus.fcp; * A “PeerRemoved” message is sent by the node when a peer has been removed. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class PeerRemoved extends BaseMessage { diff --git a/src/net/pterodactylus/fcp/Persistence.java b/src/net/pterodactylus/fcp/Persistence.java index a8775fa..f0bada8 100644 --- a/src/net/pterodactylus/fcp/Persistence.java +++ b/src/net/pterodactylus/fcp/Persistence.java @@ -23,7 +23,6 @@ package net.pterodactylus.fcp; * Convenience class for persistence values. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public enum Persistence { diff --git a/src/net/pterodactylus/fcp/PersistentGet.java b/src/net/pterodactylus/fcp/PersistentGet.java index b4bc169..196c669 100644 --- a/src/net/pterodactylus/fcp/PersistentGet.java +++ b/src/net/pterodactylus/fcp/PersistentGet.java @@ -19,12 +19,12 @@ package net.pterodactylus.fcp; + /** * The “PersistentGet” message is sent to the client to inform it about a * persistent download, either in the client-local queue or in the global queue. * - * @author David Roden - * @version $Id$ + * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class PersistentGet extends BaseMessage { @@ -113,7 +113,7 @@ public class PersistentGet extends BaseMessage { * @return The priority of the request */ public Priority getPriority() { - return Priority.values()[FcpUtils.safeParseInt(getField("PriorityClass"), 7)]; + return Priority.values()[FcpUtils.safeParseInt(getField("PriorityClass"), Priority.unknown.ordinal())]; } /** diff --git a/src/net/pterodactylus/fcp/PersistentPut.java b/src/net/pterodactylus/fcp/PersistentPut.java index 0ec8a7e..30b89b5 100644 --- a/src/net/pterodactylus/fcp/PersistentPut.java +++ b/src/net/pterodactylus/fcp/PersistentPut.java @@ -23,8 +23,7 @@ package net.pterodactylus.fcp; * A “PersistentPut” message notifies a client about a persistent * {@link ClientPut} request. * - * @author David Roden - * @version $Id$ + * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class PersistentPut extends BaseMessage { @@ -113,11 +112,7 @@ public class PersistentPut extends BaseMessage { * priority could not be parsed */ public Priority getPriority() { - try { - return Priority.values()[Integer.valueOf(getField("PriorityClass"))]; - } catch (NumberFormatException nfe1) { - return Priority.unknown; - } + return Priority.values()[FcpUtils.safeParseInt(getField("PriorityClass"), Priority.unknown.ordinal())]; } /** diff --git a/src/net/pterodactylus/fcp/PersistentPutDir.java b/src/net/pterodactylus/fcp/PersistentPutDir.java index 1980739..569ca21 100644 --- a/src/net/pterodactylus/fcp/PersistentPutDir.java +++ b/src/net/pterodactylus/fcp/PersistentPutDir.java @@ -25,7 +25,6 @@ package net.pterodactylus.fcp; * message. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class PersistentPutDir extends BaseMessage { @@ -72,7 +71,7 @@ public class PersistentPutDir extends BaseMessage { * @return The priority of the request */ public Priority getPriority() { - return Priority.valueOf(getField("PriorityClass")); + return Priority.values()[FcpUtils.safeParseInt(getField("PriorityClass"), Priority.unknown.ordinal())]; } /** diff --git a/src/net/pterodactylus/fcp/PersistentRequestModified.java b/src/net/pterodactylus/fcp/PersistentRequestModified.java index f176803..ac1e4b3 100644 --- a/src/net/pterodactylus/fcp/PersistentRequestModified.java +++ b/src/net/pterodactylus/fcp/PersistentRequestModified.java @@ -24,7 +24,6 @@ package net.pterodactylus.fcp; * {@link ModifyPersistentRequest}. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class PersistentRequestModified extends BaseMessage { diff --git a/src/net/pterodactylus/fcp/PersistentRequestRemoved.java b/src/net/pterodactylus/fcp/PersistentRequestRemoved.java index c9cacce..27322ba 100644 --- a/src/net/pterodactylus/fcp/PersistentRequestRemoved.java +++ b/src/net/pterodactylus/fcp/PersistentRequestRemoved.java @@ -24,7 +24,6 @@ package net.pterodactylus.fcp; * removed from either the global or the client-local queue. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class PersistentRequestRemoved extends BaseMessage { diff --git a/src/net/pterodactylus/fcp/PluginInfo.java b/src/net/pterodactylus/fcp/PluginInfo.java index 2cb5d1c..2d1878c 100644 --- a/src/net/pterodactylus/fcp/PluginInfo.java +++ b/src/net/pterodactylus/fcp/PluginInfo.java @@ -23,7 +23,6 @@ package net.pterodactylus.fcp; * The “PluginInfo” message is a reply to the {@link GetPluginInfo} request. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class PluginInfo extends BaseMessage { diff --git a/src/net/pterodactylus/fcp/Priority.java b/src/net/pterodactylus/fcp/Priority.java index 3c99a07..3b3c73f 100644 --- a/src/net/pterodactylus/fcp/Priority.java +++ b/src/net/pterodactylus/fcp/Priority.java @@ -23,7 +23,6 @@ package net.pterodactylus.fcp; * The priority classes used by the Freenet node. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public enum Priority { diff --git a/src/net/pterodactylus/fcp/ProtocolError.java b/src/net/pterodactylus/fcp/ProtocolError.java index bc4629e..d727e33 100644 --- a/src/net/pterodactylus/fcp/ProtocolError.java +++ b/src/net/pterodactylus/fcp/ProtocolError.java @@ -22,8 +22,7 @@ package net.pterodactylus.fcp; /** * The “ProtocolError” message signals that something has gone really wrong. * - * @author David Roden - * @version $Id$ + * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class ProtocolError extends BaseMessage { diff --git a/src/net/pterodactylus/fcp/PutFailed.java b/src/net/pterodactylus/fcp/PutFailed.java index 6eedc05..8a765e9 100644 --- a/src/net/pterodactylus/fcp/PutFailed.java +++ b/src/net/pterodactylus/fcp/PutFailed.java @@ -30,7 +30,6 @@ import java.util.Map.Entry; * request will be sent. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class PutFailed extends BaseMessage { diff --git a/src/net/pterodactylus/fcp/PutFetchable.java b/src/net/pterodactylus/fcp/PutFetchable.java index dca0d52..1b49670 100644 --- a/src/net/pterodactylus/fcp/PutFetchable.java +++ b/src/net/pterodactylus/fcp/PutFetchable.java @@ -25,7 +25,6 @@ package net.pterodactylus.fcp; * fetchable. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class PutFetchable extends BaseMessage { diff --git a/src/net/pterodactylus/fcp/PutSuccessful.java b/src/net/pterodactylus/fcp/PutSuccessful.java index 7790cd8..df349f5 100644 --- a/src/net/pterodactylus/fcp/PutSuccessful.java +++ b/src/net/pterodactylus/fcp/PutSuccessful.java @@ -24,7 +24,6 @@ package net.pterodactylus.fcp; * {@link ClientPut} (or similar) request. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class PutSuccessful extends BaseMessage { diff --git a/src/net/pterodactylus/fcp/RemovePeer.java b/src/net/pterodactylus/fcp/RemovePeer.java index 922801f..ee1f428 100644 --- a/src/net/pterodactylus/fcp/RemovePeer.java +++ b/src/net/pterodactylus/fcp/RemovePeer.java @@ -23,7 +23,6 @@ package net.pterodactylus.fcp; * The “RemovePeer” command removes a peer. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class RemovePeer extends FcpMessage { diff --git a/src/net/pterodactylus/fcp/RemovePersistentRequest.java b/src/net/pterodactylus/fcp/RemovePersistentRequest.java index fcdf0f3..b3ecab4 100644 --- a/src/net/pterodactylus/fcp/RemovePersistentRequest.java +++ b/src/net/pterodactylus/fcp/RemovePersistentRequest.java @@ -25,7 +25,6 @@ package net.pterodactylus.fcp; * {@link PutFailed} message), if necessary. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class RemovePersistentRequest extends FcpMessage { diff --git a/src/net/pterodactylus/fcp/ReturnType.java b/src/net/pterodactylus/fcp/ReturnType.java index 4fadad6..8a6071e 100644 --- a/src/net/pterodactylus/fcp/ReturnType.java +++ b/src/net/pterodactylus/fcp/ReturnType.java @@ -23,7 +23,6 @@ package net.pterodactylus.fcp; * The different return types for {@link ClientGet} requests. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public enum ReturnType { diff --git a/src/net/pterodactylus/fcp/SSKKeypair.java b/src/net/pterodactylus/fcp/SSKKeypair.java index dff44e3..b7cd574 100644 --- a/src/net/pterodactylus/fcp/SSKKeypair.java +++ b/src/net/pterodactylus/fcp/SSKKeypair.java @@ -24,7 +24,6 @@ package net.pterodactylus.fcp; * message. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class SSKKeypair extends BaseMessage { diff --git a/src/net/pterodactylus/fcp/Shutdown.java b/src/net/pterodactylus/fcp/Shutdown.java index ab86c7a..4618dc0 100644 --- a/src/net/pterodactylus/fcp/Shutdown.java +++ b/src/net/pterodactylus/fcp/Shutdown.java @@ -23,7 +23,6 @@ package net.pterodactylus.fcp; * Command that shuts down the node. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class Shutdown extends FcpMessage { diff --git a/src/net/pterodactylus/fcp/SimpleProgress.java b/src/net/pterodactylus/fcp/SimpleProgress.java index 769f623..f7420f7 100644 --- a/src/net/pterodactylus/fcp/SimpleProgress.java +++ b/src/net/pterodactylus/fcp/SimpleProgress.java @@ -24,7 +24,6 @@ package net.pterodactylus.fcp; * {@link ClientGet} or {@link ClientPut} operation. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class SimpleProgress extends BaseMessage { diff --git a/src/net/pterodactylus/fcp/StartedCompression.java b/src/net/pterodactylus/fcp/StartedCompression.java index f67f738..fd450f7 100644 --- a/src/net/pterodactylus/fcp/StartedCompression.java +++ b/src/net/pterodactylus/fcp/StartedCompression.java @@ -24,7 +24,6 @@ package net.pterodactylus.fcp; * request has started. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class StartedCompression extends BaseMessage { diff --git a/src/net/pterodactylus/fcp/SubscribeUSK.java b/src/net/pterodactylus/fcp/SubscribeUSK.java index 07d5fb4..b972a3f 100644 --- a/src/net/pterodactylus/fcp/SubscribeUSK.java +++ b/src/net/pterodactylus/fcp/SubscribeUSK.java @@ -24,7 +24,6 @@ package net.pterodactylus.fcp; * of a USK changes. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class SubscribeUSK extends FcpMessage { diff --git a/src/net/pterodactylus/fcp/SubscribedUSKUpdate.java b/src/net/pterodactylus/fcp/SubscribedUSKUpdate.java index 16ac43e..6eb30cb 100644 --- a/src/net/pterodactylus/fcp/SubscribedUSKUpdate.java +++ b/src/net/pterodactylus/fcp/SubscribedUSKUpdate.java @@ -27,7 +27,6 @@ package net.pterodactylus.fcp; * inbetween as welL! * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class SubscribedUSKUpdate extends BaseMessage { diff --git a/src/net/pterodactylus/fcp/TestDDAComplete.java b/src/net/pterodactylus/fcp/TestDDAComplete.java index f11a0fd..4da6e3c 100644 --- a/src/net/pterodactylus/fcp/TestDDAComplete.java +++ b/src/net/pterodactylus/fcp/TestDDAComplete.java @@ -24,7 +24,6 @@ package net.pterodactylus.fcp; * your read and write access to a certain directory. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class TestDDAComplete extends BaseMessage { diff --git a/src/net/pterodactylus/fcp/TestDDAReply.java b/src/net/pterodactylus/fcp/TestDDAReply.java index 6753679..0438595 100644 --- a/src/net/pterodactylus/fcp/TestDDAReply.java +++ b/src/net/pterodactylus/fcp/TestDDAReply.java @@ -27,7 +27,6 @@ package net.pterodactylus.fcp; * will give you a filename to write {@link #getContentToWrite()} to. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class TestDDAReply extends BaseMessage { diff --git a/src/net/pterodactylus/fcp/TestDDARequest.java b/src/net/pterodactylus/fcp/TestDDARequest.java index 67e5816..328c65e 100644 --- a/src/net/pterodactylus/fcp/TestDDARequest.java +++ b/src/net/pterodactylus/fcp/TestDDARequest.java @@ -23,7 +23,6 @@ package net.pterodactylus.fcp; * The “TestDDARequest” initiates a DDA test sequence. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class TestDDARequest extends FcpMessage { diff --git a/src/net/pterodactylus/fcp/TestDDAResponse.java b/src/net/pterodactylus/fcp/TestDDAResponse.java index cb452f7..9cbbeeb 100644 --- a/src/net/pterodactylus/fcp/TestDDAResponse.java +++ b/src/net/pterodactylus/fcp/TestDDAResponse.java @@ -25,7 +25,6 @@ package net.pterodactylus.fcp; * read the content of the file given by {@link TestDDAReply#getReadFilename()}. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class TestDDAResponse extends FcpMessage { diff --git a/src/net/pterodactylus/fcp/URIGenerated.java b/src/net/pterodactylus/fcp/URIGenerated.java index 16e2204..aec5483 100644 --- a/src/net/pterodactylus/fcp/URIGenerated.java +++ b/src/net/pterodactylus/fcp/URIGenerated.java @@ -25,7 +25,6 @@ package net.pterodactylus.fcp; * request. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class URIGenerated extends BaseMessage { diff --git a/src/net/pterodactylus/fcp/UnknownNodeIdentifier.java b/src/net/pterodactylus/fcp/UnknownNodeIdentifier.java index def420b..929525f 100644 --- a/src/net/pterodactylus/fcp/UnknownNodeIdentifier.java +++ b/src/net/pterodactylus/fcp/UnknownNodeIdentifier.java @@ -24,7 +24,6 @@ package net.pterodactylus.fcp; * identifier given in a command like {@link ListPeer} is unknown. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class UnknownNodeIdentifier extends BaseMessage { diff --git a/src/net/pterodactylus/fcp/UnknownPeerNoteType.java b/src/net/pterodactylus/fcp/UnknownPeerNoteType.java index 41691a5..8a82d43 100644 --- a/src/net/pterodactylus/fcp/UnknownPeerNoteType.java +++ b/src/net/pterodactylus/fcp/UnknownPeerNoteType.java @@ -24,7 +24,6 @@ package net.pterodactylus.fcp; * note used in a previous {@link ModifyPeerNote} is unknown. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class UnknownPeerNoteType extends BaseMessage { diff --git a/src/net/pterodactylus/fcp/UploadFrom.java b/src/net/pterodactylus/fcp/UploadFrom.java index 872ecb3..4060e8c 100644 --- a/src/net/pterodactylus/fcp/UploadFrom.java +++ b/src/net/pterodactylus/fcp/UploadFrom.java @@ -24,7 +24,6 @@ package net.pterodactylus.fcp; * {@link ClientPut} and {@link ClientGet} requests. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public enum UploadFrom { diff --git a/src/net/pterodactylus/fcp/Verbosity.java b/src/net/pterodactylus/fcp/Verbosity.java index 393e7f5..56c7f6b 100644 --- a/src/net/pterodactylus/fcp/Verbosity.java +++ b/src/net/pterodactylus/fcp/Verbosity.java @@ -27,7 +27,6 @@ package net.pterodactylus.fcp; * new verbosity using {@link #add(Verbosity)}. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class Verbosity { diff --git a/src/net/pterodactylus/fcp/Version.java b/src/net/pterodactylus/fcp/Version.java index 1ce7c1b..2c7bde5 100644 --- a/src/net/pterodactylus/fcp/Version.java +++ b/src/net/pterodactylus/fcp/Version.java @@ -25,7 +25,6 @@ import java.util.StringTokenizer; * Container for the “lastGoodVersion” field. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class Version { diff --git a/src/net/pterodactylus/fcp/WatchGlobal.java b/src/net/pterodactylus/fcp/WatchGlobal.java index e78ad0e..48c00cf 100644 --- a/src/net/pterodactylus/fcp/WatchGlobal.java +++ b/src/net/pterodactylus/fcp/WatchGlobal.java @@ -24,7 +24,6 @@ package net.pterodactylus.fcp; * addition to the client-local queue. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public class WatchGlobal extends FcpMessage {