From: David ‘Bombe’ Roden Date: Mon, 23 Jun 2008 20:32:01 +0000 (+0200) Subject: whitespace fixed X-Git-Tag: 0.7~32 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=bbfa208695e2a7f1bb555f841623945767f296e7;p=jSite.git whitespace fixed --- diff --git a/src/de/todesbaum/jsite/application/FileOption.java b/src/de/todesbaum/jsite/application/FileOption.java index 41e83b7..c1d201a 100644 --- a/src/de/todesbaum/jsite/application/FileOption.java +++ b/src/de/todesbaum/jsite/application/FileOption.java @@ -21,7 +21,7 @@ package de.todesbaum.jsite.application; /** * Container for various file options. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class FileOption { @@ -64,7 +64,7 @@ public class FileOption { /** * Creates new file options. - * + * * @param defaultMimeType * The default MIME type of the file */ @@ -81,7 +81,7 @@ public class FileOption { /** * Returns the custom key. The custom key is only used when * {@link #isInsert()} returns true. - * + * * @return The custom key */ public String getCustomKey() { @@ -91,7 +91,7 @@ public class FileOption { /** * Sets the custom key. The custom key is only used when {@link #isInsert()} * returns true. - * + * * @param customKey * The custom key */ @@ -105,7 +105,7 @@ public class FileOption { /** * Returns whether the file should be inserted. If a file is not inserted, a * custom key has to be specified for it. - * + * * @see #setCustomKey(String) * @return true if the file should be inserted, * false otherwise @@ -117,7 +117,7 @@ public class FileOption { /** * Sets whether the file should be inserted. If a file is not inserted, a * custom key has to be specified for it. - * + * * @param insert * true if the file should be inserted, * false otherwise @@ -129,7 +129,7 @@ public class FileOption { /** * Sets the MIME type of the file. Setting the MIME type to * null will set the MIME type to the default MIME type. - * + * * @param mimeType * The MIME type of the file */ @@ -143,7 +143,7 @@ public class FileOption { /** * Returns the MIME type of the file. If no custom MIME type has been set, * the default MIME type is returned. - * + * * @return The MIME type of the file */ public String getMimeType() { @@ -152,7 +152,7 @@ public class FileOption { /** * Returns the name of the container this file should be put in. - * + * * @return The name of the container */ public String getContainer() { @@ -161,7 +161,7 @@ public class FileOption { /** * Sets the name of the container this file should be put in. - * + * * @param container * The name of the container */ @@ -174,7 +174,7 @@ public class FileOption { /** * Sets whether the file should have “$[EDITION+n]” tags replaced. - * + * * @param replaceEdition * true to replace tags, false not * to replace @@ -186,7 +186,7 @@ public class FileOption { /** * Returns whether the file should have “$[EDITION+n]” tags * replaced. - * + * * @return true if tags should be replaced, * false otherwise */ @@ -196,7 +196,7 @@ public class FileOption { /** * Sets the range of editions that should be replaced. - * + * * @param editionRange * The range editions to replace */ @@ -206,7 +206,7 @@ public class FileOption { /** * Returns the range of editions that should be replaced. - * + * * @return The range of editions to replace */ public int getEditionRange() { @@ -216,7 +216,7 @@ public class FileOption { /** * Returns whether the options for this file have been modified, i.e. are * not at their default values. - * + * * @return true if the options have been modified, * false if they are at default values */ diff --git a/src/de/todesbaum/jsite/application/Freenet7Interface.java b/src/de/todesbaum/jsite/application/Freenet7Interface.java index d670fd2..a271f6b 100644 --- a/src/de/todesbaum/jsite/application/Freenet7Interface.java +++ b/src/de/todesbaum/jsite/application/Freenet7Interface.java @@ -47,8 +47,8 @@ public class Freenet7Interface { private Connection connection; /** - * Sets the hostname of the node. The default port for FCP2 connections ( - * {@link Node#DEFAULT_PORT}) is used. + * Sets the hostname of the node. The default port for FCP2 connections ({@link Node#DEFAULT_PORT}) + * is used. * * @param hostname * The hostname of the node diff --git a/src/de/todesbaum/jsite/application/InsertListener.java b/src/de/todesbaum/jsite/application/InsertListener.java index 1371061..65b0602 100644 --- a/src/de/todesbaum/jsite/application/InsertListener.java +++ b/src/de/todesbaum/jsite/application/InsertListener.java @@ -23,14 +23,14 @@ import java.util.EventListener; /** * Interface for objects that want to be notified abount insert events. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public interface InsertListener extends EventListener { /** * Enumeration for the different error situations. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public static enum ErrorType { @@ -53,7 +53,7 @@ public interface InsertListener extends EventListener { /** * Notifies a listener that an insert has started. - * + * * @param project * The project that is now being inserted */ @@ -61,7 +61,7 @@ public interface InsertListener extends EventListener { /** * Notifies a listener that a project insert has generated a URI. - * + * * @param project * The project being inserted * @param uri @@ -71,7 +71,7 @@ public interface InsertListener extends EventListener { /** * Notifies a listener that an insert has made some progress. - * + * * @param project * The project being inserted * @param succeeded @@ -90,7 +90,7 @@ public interface InsertListener extends EventListener { /** * Notifies a listener that a project insert has finished. - * + * * @param project * The project being inserted * @param success diff --git a/src/de/todesbaum/jsite/application/Node.java b/src/de/todesbaum/jsite/application/Node.java index d507311..aae1f7a 100644 --- a/src/de/todesbaum/jsite/application/Node.java +++ b/src/de/todesbaum/jsite/application/Node.java @@ -1,5 +1,5 @@ /* - * jSite-0.7 - + * jSite-0.7 - * Copyright (C) 2006 David Roden * * This program is free software; you can redistribute it and/or modify @@ -21,7 +21,7 @@ package de.todesbaum.jsite.application; /** * Container for node information. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class Node extends de.todesbaum.util.freenet.fcp2.Node { @@ -31,7 +31,7 @@ public class Node extends de.todesbaum.util.freenet.fcp2.Node { /** * Creates a new node with the given hostname and the default port. - * + * * @see de.todesbaum.util.freenet.fcp2.Node#DEFAULT_PORT * @param hostname * The hostname of the new node @@ -42,7 +42,7 @@ public class Node extends de.todesbaum.util.freenet.fcp2.Node { /** * Creates a new node with the given hostname and port. - * + * * @param hostname * The hostname of the new node * @param port @@ -54,7 +54,7 @@ public class Node extends de.todesbaum.util.freenet.fcp2.Node { /** * Creates a new node with the given hostname, port, and name. - * + * * @param hostname * The hostname of the new node * @param port @@ -69,7 +69,7 @@ public class Node extends de.todesbaum.util.freenet.fcp2.Node { /** * Creates a new node that gets its settings from the given node. - * + * * @param node * The node to copy */ @@ -79,7 +79,7 @@ public class Node extends de.todesbaum.util.freenet.fcp2.Node { /** * Creates a new node from the given node, overwriting the name. - * + * * @param node * The node to copy from * @param name @@ -91,7 +91,7 @@ public class Node extends de.todesbaum.util.freenet.fcp2.Node { /** * Sets the name of the node. - * + * * @param name * The name of the node */ @@ -101,7 +101,7 @@ public class Node extends de.todesbaum.util.freenet.fcp2.Node { /** * Returns the name of the node. - * + * * @return The name of the node */ public String getName() { @@ -110,7 +110,7 @@ public class Node extends de.todesbaum.util.freenet.fcp2.Node { /** * Sets the hostname of the node. - * + * * @param hostname * The hostname of the node */ @@ -120,7 +120,7 @@ public class Node extends de.todesbaum.util.freenet.fcp2.Node { /** * Sets the port of the node. - * + * * @param port * The port of the node */ diff --git a/src/de/todesbaum/jsite/gui/FileScanner.java b/src/de/todesbaum/jsite/gui/FileScanner.java index b699ebb..bca7d64 100644 --- a/src/de/todesbaum/jsite/gui/FileScanner.java +++ b/src/de/todesbaum/jsite/gui/FileScanner.java @@ -32,7 +32,7 @@ import de.todesbaum.jsite.i18n.I18n; /** * Scans the local path of a project anychronously and returns the list of found * files as an event. - * + * * @see Project#getLocalPath() * @see FileScannerListener#fileScannerFinished(FileScanner) * @author David ‘Bombe’ Roden <bombe@freenetproject.org> @@ -53,7 +53,7 @@ public class FileScanner implements Runnable { /** * Creates a new file scanner for the given project. - * + * * @param project * The project whose files to scan */ @@ -63,7 +63,7 @@ public class FileScanner implements Runnable { /** * Adds the given listener to the list of listeners. - * + * * @param fileScannerListener * The listener to add */ @@ -73,7 +73,7 @@ public class FileScanner implements Runnable { /** * Removes the given listener from the list of listeners. - * + * * @param fileScannerListener * The listener to remove */ @@ -95,7 +95,7 @@ public class FileScanner implements Runnable { *

* Scans all available files in the project’s local path and emits an event * when finished. - * + * * @see FileScannerListener#fileScannerFinished(FileScanner) */ public void run() { @@ -112,7 +112,7 @@ public class FileScanner implements Runnable { /** * Returns whether there was an error scanning for files. - * + * * @return true if there was an error, false * otherwise */ @@ -122,7 +122,7 @@ public class FileScanner implements Runnable { /** * Returns the list of found files. - * + * * @return The list of found files */ public List getFiles() { @@ -131,7 +131,7 @@ public class FileScanner implements Runnable { /** * Recursively scans a directory and adds all found files to the given list. - * + * * @param rootDir * The directory to scan * @param fileList diff --git a/src/de/todesbaum/jsite/gui/FileScannerListener.java b/src/de/todesbaum/jsite/gui/FileScannerListener.java index 3ca01db..838a2ed 100644 --- a/src/de/todesbaum/jsite/gui/FileScannerListener.java +++ b/src/de/todesbaum/jsite/gui/FileScannerListener.java @@ -24,7 +24,7 @@ import java.util.EventListener; /** * Listener interface for objects that want to be notified when scanning a * project’s local path has finished. - * + * * @see FileScanner * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ @@ -32,7 +32,7 @@ public interface FileScannerListener extends EventListener { /** * Notifies a listener that scanning a project’s local path has finished. - * + * * @param fileScanner * The file scanner that finished */ diff --git a/src/de/todesbaum/jsite/gui/NodeManagerListener.java b/src/de/todesbaum/jsite/gui/NodeManagerListener.java index 924c7f6..d6a9404 100644 --- a/src/de/todesbaum/jsite/gui/NodeManagerListener.java +++ b/src/de/todesbaum/jsite/gui/NodeManagerListener.java @@ -1,5 +1,5 @@ /* - * jSite-0.7 - + * jSite-0.7 - * Copyright (C) 2006 David Roden * * This program is free software; you can redistribute it and/or modify @@ -26,14 +26,14 @@ import de.todesbaum.jsite.application.Node; /** * Listener interface for objects that want to be notified if the node * configuration changes. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public interface NodeManagerListener extends EventListener { /** * Notifies a listener that the node configuration was changed. - * + * * @param nodes * The new list of nodes */ diff --git a/src/de/todesbaum/jsite/i18n/I18n.java b/src/de/todesbaum/jsite/i18n/I18n.java index 1194473..5b16aff 100644 --- a/src/de/todesbaum/jsite/i18n/I18n.java +++ b/src/de/todesbaum/jsite/i18n/I18n.java @@ -25,7 +25,7 @@ import java.util.ResourceBundle; /** * Maps i18n keys to translated texts, depending on a current locale. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class I18n { @@ -38,7 +38,7 @@ public class I18n { /** * Returns the currently set locale. - * + * * @return The current locale */ public static Locale getLocale() { @@ -50,7 +50,7 @@ public class I18n { /** * Sets the current locale. - * + * * @param locale * The new current locale */ @@ -61,7 +61,7 @@ public class I18n { /** * Returns the resource bundle for the current locale. - * + * * @return The resource bundle for the current locale */ public static ResourceBundle getResourceBundle() { @@ -70,7 +70,7 @@ public class I18n { /** * Returns the resource bundle for the given locale. - * + * * @param locale * The locale to get the resource bundle for * @return The resource bundle for the given locale @@ -83,7 +83,7 @@ public class I18n { * Retrieves a translated text for the given i18n key. If the resource * bundle for the current locale does not have a translation for the given * key, the default locale is tried. If that fails, the key is returned. - * + * * @param key * The key to get the translation for * @return The translated value, or the key itself if not translation can be diff --git a/src/de/todesbaum/jsite/i18n/I18nContainer.java b/src/de/todesbaum/jsite/i18n/I18nContainer.java index 483c6e2..3676c41 100644 --- a/src/de/todesbaum/jsite/i18n/I18nContainer.java +++ b/src/de/todesbaum/jsite/i18n/I18nContainer.java @@ -1,16 +1,16 @@ /* * jSite-remote - I18nContainer.java Copyright © 2007 David Roden - * + * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation; either version 2 of the License, or (at your option) any later * version. - * + * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. - * + * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place - Suite 330, Boston, MA 02111-1307, USA. @@ -26,7 +26,7 @@ import java.util.List; /** * Container that collects {@link Runnable}s that change the texts of GUI * components when the current locale has changed. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class I18nContainer implements Iterable { @@ -45,7 +45,7 @@ public class I18nContainer implements Iterable { /** * Returns the singleton instance. - * + * * @return The singleton instance */ public static I18nContainer getInstance() { @@ -55,7 +55,7 @@ public class I18nContainer implements Iterable { /** * Registers an i18n runnable that is run when the current locale has * changed. - * + * * @param i18nRunnable * The runnable to register */ @@ -66,7 +66,7 @@ public class I18nContainer implements Iterable { /** * Registers a {@link Runnable} that changes texts when the current locale * has changed and runs after {@link #i18nRunnables} have run. - * + * * @param i18nPostRunnable * The runnable to register */ diff --git a/src/de/todesbaum/jsite/main/CLI.java b/src/de/todesbaum/jsite/main/CLI.java index 627517c..1fe69ba 100644 --- a/src/de/todesbaum/jsite/main/CLI.java +++ b/src/de/todesbaum/jsite/main/CLI.java @@ -1,5 +1,5 @@ /* - * jSite - + * jSite - * Copyright (C) 2006 David Roden * * This program is free software; you can redistribute it and/or modify @@ -29,7 +29,7 @@ import de.todesbaum.jsite.application.ProjectInserter; /** * Command-line interface for jSite. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> */ public class CLI implements InsertListener { @@ -60,7 +60,7 @@ public class CLI implements InsertListener { /** * Creates a new command-line interface. - * + * * @param args * The command-line arguments */ @@ -157,7 +157,7 @@ public class CLI implements InsertListener { /** * Returns the project with the given name. - * + * * @param name * The name of the project * @return The project, or null if no project could be found @@ -173,7 +173,7 @@ public class CLI implements InsertListener { /** * Returns the node with the given name. - * + * * @param name * The name of the node * @return The node, or null if no node could be found @@ -189,7 +189,7 @@ public class CLI implements InsertListener { /** * Inserts the given project. - * + * * @param currentProject * The project to insert * @return true if the insert finished successfully, @@ -257,7 +257,7 @@ public class CLI implements InsertListener { /** * Creates a new command-line interface with the given arguments. - * + * * @param args * The command-line arguments */ diff --git a/src/de/todesbaum/util/freenet/fcp2/Client.java b/src/de/todesbaum/util/freenet/fcp2/Client.java index bf02444..9376159 100644 --- a/src/de/todesbaum/util/freenet/fcp2/Client.java +++ b/src/de/todesbaum/util/freenet/fcp2/Client.java @@ -1,5 +1,5 @@ /* - * todesbaum-lib - + * todesbaum-lib - * Copyright (C) 2006 David Roden * * This program is free software; you can redistribute it and/or modify @@ -26,7 +26,7 @@ import java.util.List; /** * A Client executes {@link Command}s over a {@link Connection} to a * {@link Node} and delivers resulting {@link Message}s. - * + * * @author David Roden <droden@gmail.com> * @version $Id$ */ @@ -49,7 +49,7 @@ public class Client implements ConnectionListener { /** * Creates a new client that operates on the specified connection. - * + * * @param connection * The connection to operate on */ @@ -61,7 +61,7 @@ public class Client implements ConnectionListener { /** * Creates a new client that operates on the specified connection and * immediately executes the specified command. - * + * * @param connection * The connection to operate on * @param command @@ -78,7 +78,7 @@ public class Client implements ConnectionListener { /** * Returns whether this client catches all messages going over the * connection. - * + * * @return true if the client catches all messages, * false otherwise */ @@ -88,7 +88,7 @@ public class Client implements ConnectionListener { /** * Sets whether this client catches all messages going over the connection. - * + * * @param catchAll * true if the client should catch all messages, * false otherwise @@ -101,7 +101,7 @@ public class Client implements ConnectionListener { * Executes the specified command. This will also clear the queue of * messages, discarding all messages that resulted from the previous command * and have not yet been read. - * + * * @param command * The command to execute * @throws IOException @@ -115,7 +115,7 @@ public class Client implements ConnectionListener { /** * Executes the specified command and optionally clears the list of * identifiers this clients listens to before starting the command. - * + * * @param command * The command to execute * @param removeExistingIdentifiers @@ -139,7 +139,7 @@ public class Client implements ConnectionListener { * Returns the next message, waiting endlessly for it, if need be. If you * are not sure whether a message will arrive, better use * {@link #readMessage(long)} to only wait for a specific time. - * + * * @return The next message that resulted from the execution of the last * command * @see #readMessage(long) @@ -153,7 +153,7 @@ public class Client implements ConnectionListener { * Returns the next message. If the message queue is currently empty, at * least maxWaitTime milliseconds will be waited for a * message to arrive. - * + * * @param maxWaitTime * The minimum time to wait for a message, in milliseconds * @return The message, or null if no message arrived in time @@ -181,7 +181,7 @@ public class Client implements ConnectionListener { /** * Returns whether the client is currently disconnected. - * + * * @return true if the client is disconnected, * false otherwise */ diff --git a/src/de/todesbaum/util/freenet/fcp2/ClientHello.java b/src/de/todesbaum/util/freenet/fcp2/ClientHello.java index ef84667..4b9e41d 100644 --- a/src/de/todesbaum/util/freenet/fcp2/ClientHello.java +++ b/src/de/todesbaum/util/freenet/fcp2/ClientHello.java @@ -1,5 +1,5 @@ /* - * todesbaum-lib - + * todesbaum-lib - * Copyright (C) 2006 David Roden * * This program is free software; you can redistribute it and/or modify @@ -28,7 +28,7 @@ import java.io.Writer; * takes care of that) and must not be sent afterwards. *

* The node can answer with the following messages: NodeHello. - * + * * @author David Roden <droden@gmail.com> * @version $Id$ */ @@ -51,7 +51,7 @@ public class ClientHello extends Command { * Returns the value of the ExpectedVersion parameter of this * command. At the moment this value is not used by the node but in the * future this may be used to enforce certain node versions. - * + * * @return The expected version */ public String getExpectedVersion() { @@ -62,7 +62,7 @@ public class ClientHello extends Command { * Sets the value of the ExpectedVersion parameter of this * command. At the moment this value is not used by the node but in the * future this may be used to enforce certain node versions. - * + * * @param expectedVersion * The expected version */ @@ -72,7 +72,7 @@ public class ClientHello extends Command { /** * Returns the name of the client that is connecting. - * + * * @return The name of the client */ public String getName() { @@ -81,7 +81,7 @@ public class ClientHello extends Command { /** * Sets the name of the client that is connecting. - * + * * @param name * The name of the client */ diff --git a/src/de/todesbaum/util/freenet/fcp2/ClientPut.java b/src/de/todesbaum/util/freenet/fcp2/ClientPut.java index b6b91b1..dd0de6a 100644 --- a/src/de/todesbaum/util/freenet/fcp2/ClientPut.java +++ b/src/de/todesbaum/util/freenet/fcp2/ClientPut.java @@ -1,5 +1,5 @@ /* - * todesbaum-lib - + * todesbaum-lib - * Copyright (C) 2006 David Roden * * This program is free software; you can redistribute it and/or modify @@ -25,7 +25,7 @@ import java.io.Writer; /** * Abstract base class for all put requests. It contains all parameters that put * requests have in common. - * + * * @author David Roden <droden@gmail.com> * @version $Id$ */ @@ -33,7 +33,7 @@ public abstract class ClientPut extends Command { /** The URI of this request. */ protected final String uri; - + /** The client token of this request. */ protected String clientToken = null; @@ -60,7 +60,7 @@ public abstract class ClientPut extends Command { /** * Creates a new put request with the specified name, identifier and URI. - * + * * @param name * The name of this request * @param identifier @@ -75,7 +75,7 @@ public abstract class ClientPut extends Command { /** * Returns whether the node should not try to compress the data. - * + * * @return true if the node should not try * to compress the data */ @@ -90,7 +90,7 @@ public abstract class ClientPut extends Command { * archives like ZIP files. Otherwise the node will try to compress the file * which -- depending on the size of the data -- might take a lot of time * and memory. - * + * * @param dontCompress * true if the node should not * try to compress the data diff --git a/src/de/todesbaum/util/freenet/fcp2/ClientPutDir.java b/src/de/todesbaum/util/freenet/fcp2/ClientPutDir.java index 1474c7d..b9291a9 100644 --- a/src/de/todesbaum/util/freenet/fcp2/ClientPutDir.java +++ b/src/de/todesbaum/util/freenet/fcp2/ClientPutDir.java @@ -1,5 +1,5 @@ /* - * todesbaum-lib - + * todesbaum-lib - * Copyright (C) 2006 David Roden * * This program is free software; you can redistribute it and/or modify @@ -24,7 +24,7 @@ import java.io.Writer; /** * Abstract base class for all put requests that insert a directory. - * + * * @author David Roden <droden@gmail.com> * @version $Id$ */ @@ -35,7 +35,7 @@ public class ClientPutDir extends ClientPut { /** * Creates a new request with the specified name, identifier, and URI. - * + * * @param name * The name of the request * @param identifier @@ -49,7 +49,7 @@ public class ClientPutDir extends ClientPut { /** * Returns the default name of the directory. - * + * * @return The default name of the directory */ public String getDefaultName() { @@ -62,7 +62,7 @@ public class ClientPutDir extends ClientPut { * requested without a filename. It's about the same as the * index.html file that gets delivered if you only request a * directory from a webserver. - * + * * @param defaultName * The default name of the directory */ diff --git a/src/de/todesbaum/util/freenet/fcp2/Command.java b/src/de/todesbaum/util/freenet/fcp2/Command.java index d1086c8..9fc9527 100644 --- a/src/de/todesbaum/util/freenet/fcp2/Command.java +++ b/src/de/todesbaum/util/freenet/fcp2/Command.java @@ -1,5 +1,5 @@ /* - * todesbaum-lib - + * todesbaum-lib - * Copyright (C) 2006 David Roden * * This program is free software; you can redistribute it and/or modify @@ -33,7 +33,7 @@ import java.io.Writer; * name of the {@link de.todesbaum.util.freenet.fcp2.Connection} connects). So * when receiving messages from the node you should always be prepared for * something you did not expect. - * + * * @author David Roden <droden@gmail.com> * @version $Id$ */ @@ -56,7 +56,7 @@ public abstract class Command { /** * Creates a new command with the specified name and identifier. - * + * * @param name * The name of the command * @param identifier @@ -69,7 +69,7 @@ public abstract class Command { /** * Returns the name of this command. - * + * * @return The name of this command */ public String getCommandName() { @@ -78,7 +78,7 @@ public abstract class Command { /** * Return the identifier of this command. - * + * * @return The identifier of this command */ public String getIdentifier() { @@ -91,7 +91,7 @@ public abstract class Command { * NOTE: Subclasses of Command must call * super.write(writer) before or after writing their own * parameters! - * + * * @param writer * The stream to write the parameters to * @throws IOException @@ -106,7 +106,7 @@ public abstract class Command { * Returns whether this command has payload to send after the message. * Subclasses need to return true here if they need to send * payload after the message. - * + * * @return true if this command has payload to send, * false otherwise */ @@ -118,7 +118,7 @@ public abstract class Command { * Returns the payload of this command as an {@link InputStream}. This * method is never called if {@link #hasPayload()} returns * false. - * + * * @return The payload of this command */ protected InputStream getPayload() { @@ -128,7 +128,7 @@ public abstract class Command { /** * Returns the length of the payload. This method is never called if * {@link #hasPayload()} returns false. - * + * * @return The length of the payload */ protected long getPayloadLength() { diff --git a/src/de/todesbaum/util/freenet/fcp2/Connection.java b/src/de/todesbaum/util/freenet/fcp2/Connection.java index 9932d25..9c6b74d 100644 --- a/src/de/todesbaum/util/freenet/fcp2/Connection.java +++ b/src/de/todesbaum/util/freenet/fcp2/Connection.java @@ -1,5 +1,5 @@ /* - * todesbaum-lib - + * todesbaum-lib - * Copyright (C) 2006 David Roden * * This program is free software; you can redistribute it and/or modify @@ -38,7 +38,7 @@ import de.todesbaum.util.io.TempFileInputStream; /** * A physical connection to a Freenet node. - * + * * @author David Roden <droden@gmail.com> * @version $Id$ */ @@ -73,7 +73,7 @@ public class Connection { /** * Creates a new connection to the specified node with the specified name. - * + * * @param node * The node to connect to * @param name @@ -86,7 +86,7 @@ public class Connection { /** * Adds a listener that gets notified on connection events. - * + * * @param connectionListener * The listener to add */ @@ -97,7 +97,7 @@ public class Connection { /** * Removes a listener from the list of registered listeners. Only the first * matching listener is removed. - * + * * @param connectionListener * The listener to remove * @see List#remove(java.lang.Object) @@ -108,7 +108,7 @@ public class Connection { /** * Notifies listeners about a received message. - * + * * @param message * The received message */ @@ -129,7 +129,7 @@ public class Connection { /** * Returns the name of the connection. - * + * * @return The name of the connection */ public String getName() { @@ -138,7 +138,7 @@ public class Connection { /** * Connects to the node. - * + * * @return true if the connection succeeded and the node * returned a NodeHello message * @throws IOException @@ -180,7 +180,7 @@ public class Connection { /** * Returns whether this connection is still connected to the node. - * + * * @return true if this connection is still valid, * false otherwise */ @@ -190,7 +190,7 @@ public class Connection { /** * Returns the NodeHello message the node sent on connection. - * + * * @return The NodeHello message of the node */ public Message getNodeHello() { @@ -237,7 +237,7 @@ public class Connection { /** * Executes the specified command. - * + * * @param command * The command to execute * @throws IllegalStateException @@ -269,7 +269,7 @@ public class Connection { * The reader thread for this connection. This is essentially a thread that * reads lines from the node, creates messages from them and notifies * listeners about the messages. - * + * * @author David Roden <droden@gmail.com> * @version $Id$ */ @@ -281,7 +281,7 @@ public class Connection { /** * Creates a new reader that reads from the specified input stream. - * + * * @param nodeInputStream * The input stream to read from */ diff --git a/src/de/todesbaum/util/freenet/fcp2/ConnectionListener.java b/src/de/todesbaum/util/freenet/fcp2/ConnectionListener.java index 86b33d6..9ce101d 100644 --- a/src/de/todesbaum/util/freenet/fcp2/ConnectionListener.java +++ b/src/de/todesbaum/util/freenet/fcp2/ConnectionListener.java @@ -1,5 +1,5 @@ /* - * todesbaum-lib - + * todesbaum-lib - * Copyright (C) 2006 David Roden * * This program is free software; you can redistribute it and/or modify @@ -23,7 +23,7 @@ import java.util.EventListener; /** * Interface for clients that want to be notified when a message was received. - * + * * @author David Roden <droden@gmail.com> * @version $Id$ */ @@ -31,7 +31,7 @@ public interface ConnectionListener extends EventListener { /** * Notifies a client that a message was received. - * + * * @param connection * The connection the message was received on * @param message @@ -41,7 +41,7 @@ public interface ConnectionListener extends EventListener { /** * Notifies a client that the connection to the node has been lost. - * + * * @param connection * The connection that was lost */ diff --git a/src/de/todesbaum/util/freenet/fcp2/DirectFileEntry.java b/src/de/todesbaum/util/freenet/fcp2/DirectFileEntry.java index 351fb9c..c697c1f 100644 --- a/src/de/todesbaum/util/freenet/fcp2/DirectFileEntry.java +++ b/src/de/todesbaum/util/freenet/fcp2/DirectFileEntry.java @@ -1,5 +1,5 @@ /* - * todesbaum-lib - + * todesbaum-lib - * Copyright (C) 2006 David Roden * * This program is free software; you can redistribute it and/or modify @@ -25,7 +25,7 @@ import java.io.InputStream; /** * A {@link FileEntry} that sends its payload directly to the node, using the * existing FCP connection. - * + * * @author David Roden <droden@gmail.com> * @version $Id$ */ @@ -40,7 +40,7 @@ public class DirectFileEntry extends FileEntry { /** * Creates a new FileEntry with the specified name and content type that * gets its data from the specified byte array. - * + * * @param filename * The name of the file * @param contentType @@ -55,7 +55,7 @@ public class DirectFileEntry extends FileEntry { /** * Creates a new FileEntry with the specified name and content type that * gets its data from the specified input stream. - * + * * @param filename * The name of the file * @param contentType @@ -81,7 +81,7 @@ public class DirectFileEntry extends FileEntry { /** * Returns the input stream for the file's content. - * + * * @return The input stream for the file's content */ public InputStream getDataInputStream() { @@ -90,7 +90,7 @@ public class DirectFileEntry extends FileEntry { /** * Returns the length of this file's content. - * + * * @return The length of this file's content */ public long getDataLength() { diff --git a/src/de/todesbaum/util/freenet/fcp2/DiskFileEntry.java b/src/de/todesbaum/util/freenet/fcp2/DiskFileEntry.java index e2eabc8..bb34023 100644 --- a/src/de/todesbaum/util/freenet/fcp2/DiskFileEntry.java +++ b/src/de/todesbaum/util/freenet/fcp2/DiskFileEntry.java @@ -1,5 +1,5 @@ /* - * todesbaum-lib - + * todesbaum-lib - * Copyright (C) 2006 David Roden * * This program is free software; you can redistribute it and/or modify @@ -21,7 +21,7 @@ package de.todesbaum.util.freenet.fcp2; /** * A {@link FileEntry} that reads the content from a file on the disk. - * + * * @author David Roden <droden@gmail.com> * @version $Id$ */ @@ -33,7 +33,7 @@ public class DiskFileEntry extends FileEntry { /** * Creates a new {@link FileEntry} with the specified name and content type * that is read from the file specified by localFilename. - * + * * @param filename * The name of the file * @param contentType @@ -57,7 +57,7 @@ public class DiskFileEntry extends FileEntry { /** * Returns the name of the local file that holds the content for this file. - * + * * @return The name of the local file */ public String getLocalFilename() { diff --git a/src/de/todesbaum/util/freenet/fcp2/FileEntry.java b/src/de/todesbaum/util/freenet/fcp2/FileEntry.java index 117c27f..3fcdf8b 100644 --- a/src/de/todesbaum/util/freenet/fcp2/FileEntry.java +++ b/src/de/todesbaum/util/freenet/fcp2/FileEntry.java @@ -1,5 +1,5 @@ /* - * todesbaum-lib - + * todesbaum-lib - * Copyright (C) 2006 David Roden * * This program is free software; you can redistribute it and/or modify @@ -23,7 +23,7 @@ package de.todesbaum.util.freenet.fcp2; * Abstract base class of file entries that are used in the * {@link de.todesbaum.util.freenet.fcp2.ClientPutComplexDir} command to define * the files of an insert. - * + * * @author David Roden <droden@gmail.com> * @version $Id$ */ @@ -39,7 +39,7 @@ public abstract class FileEntry { * Creates a new file entry with the specified name and content type. The * content type should be a standard MIME type with an additional charset * specification for text-based types. - * + * * @param filename * The name of the file * @param contentType @@ -57,14 +57,14 @@ public abstract class FileEntry { * disk, or redirect. This method is * implemented by the subclasses {@link DirectFileEntry}, * {@link DiskFileEntry}, and {@link RedirectFileEntry}, respectively. - * + * * @return The name of this entry's type */ public abstract String getName(); /** * Returns the content type of this file. - * + * * @return The content type of this file */ public String getContentType() { @@ -73,7 +73,7 @@ public abstract class FileEntry { /** * Returns the name of this file. - * + * * @return The name of this file */ public String getFilename() { diff --git a/src/de/todesbaum/util/freenet/fcp2/GenerateSSK.java b/src/de/todesbaum/util/freenet/fcp2/GenerateSSK.java index a0699f7..d21b7b9 100644 --- a/src/de/todesbaum/util/freenet/fcp2/GenerateSSK.java +++ b/src/de/todesbaum/util/freenet/fcp2/GenerateSSK.java @@ -1,5 +1,5 @@ /* - * todesbaum-lib - + * todesbaum-lib - * Copyright (C) 2006 David Roden * * This program is free software; you can redistribute it and/or modify @@ -23,7 +23,7 @@ package de.todesbaum.util.freenet.fcp2; * Implementation of the GenerateSSK command. *

* The node can answer with the following messages: SSKKeypair. - * + * * @author David Roden <droden@gmail.com> * @version $Id$ */ diff --git a/src/de/todesbaum/util/freenet/fcp2/Message.java b/src/de/todesbaum/util/freenet/fcp2/Message.java index a966d67..c721f0b 100644 --- a/src/de/todesbaum/util/freenet/fcp2/Message.java +++ b/src/de/todesbaum/util/freenet/fcp2/Message.java @@ -1,5 +1,5 @@ /* - * todesbaum-lib - + * todesbaum-lib - * Copyright (C) 2006 David Roden * * This program is free software; you can redistribute it and/or modify @@ -30,7 +30,7 @@ import java.util.Map.Entry; * most of the messages also have an identifier which binds it to a specific * command. Exceptions are among others NodeHello, * SSKKeypair, and EndListPersistentRequests. - * + * * @author David Roden <droden@gmail.com> * @version $Id$ * @see de.todesbaum.util.freenet.fcp2.Client @@ -51,7 +51,7 @@ public class Message { /** * Creates a new message with the specified name. - * + * * @param name * The name of this message */ @@ -61,7 +61,7 @@ public class Message { /** * Returns the identifier of this message. - * + * * @return The identifier */ public String getIdentifier() { @@ -70,7 +70,7 @@ public class Message { /** * Sets the identifier of this message. - * + * * @param identifier * The identifier of this message */ @@ -80,7 +80,7 @@ public class Message { /** * Returns the name of this message. - * + * * @return The name of this message */ public String getName() { @@ -90,7 +90,7 @@ public class Message { /** * Tests whether this message contains the parameter with the specified key. * Key names are compared ignoring case. - * + * * @param key * The name of the parameter * @return true if this parameter exists in this message, @@ -104,7 +104,7 @@ public class Message { * Returns all parameters of this message. The keys of the entries are all * lower case so if you want to match the parameter names you have to watch * out. - * + * * @return All parameters of this message */ public Set> entrySet() { @@ -114,7 +114,7 @@ public class Message { /** * Returns the value of the parameter with the name specified by * key. - * + * * @param key * The name of the parameter * @return The value of the parameter @@ -126,7 +126,7 @@ public class Message { /** * Stores the specified value as parameter with the name specified by * key. - * + * * @param key * The name of the parameter * @param value @@ -140,7 +140,7 @@ public class Message { /** * Returns the number of parameters in this message. - * + * * @return The number of parameters */ public int size() { @@ -165,7 +165,7 @@ public class Message { /** * Returns a textual representation of this message, containing its name, * the identifier, and the parameters. - * + * * @return A textual representation of this message */ public String toString() { diff --git a/src/de/todesbaum/util/freenet/fcp2/Node.java b/src/de/todesbaum/util/freenet/fcp2/Node.java index b60de44..ee50ca9 100644 --- a/src/de/todesbaum/util/freenet/fcp2/Node.java +++ b/src/de/todesbaum/util/freenet/fcp2/Node.java @@ -1,5 +1,5 @@ /* - * todesbaum-lib - + * todesbaum-lib - * Copyright (C) 2006 David Roden * * This program is free software; you can redistribute it and/or modify @@ -21,7 +21,7 @@ package de.todesbaum.util.freenet.fcp2; /** * Contains the hostname and port number of the Freenet node. - * + * * @author David Roden <droden@gmail.com> * @version $Id$ */ @@ -39,7 +39,7 @@ public class Node { /** * Creates a new node with the specified hostname and the default port * number. - * + * * @param hostname * The hostname of the node * @see #DEFAULT_PORT @@ -50,7 +50,7 @@ public class Node { /** * Creates a new node with the specified hostname and port number. - * + * * @param hostname * The hostname of the node * @param port @@ -63,7 +63,7 @@ public class Node { /** * Returns the hostname of the node. - * + * * @return The hostname of the node */ public String getHostname() { @@ -72,7 +72,7 @@ public class Node { /** * Returns the port number of the node. - * + * * @return The port number of the node */ public int getPort() { diff --git a/src/de/todesbaum/util/freenet/fcp2/Persistence.java b/src/de/todesbaum/util/freenet/fcp2/Persistence.java index b111a3e..66253f5 100644 --- a/src/de/todesbaum/util/freenet/fcp2/Persistence.java +++ b/src/de/todesbaum/util/freenet/fcp2/Persistence.java @@ -1,5 +1,5 @@ /* - * todesbaum-lib - + * todesbaum-lib - * Copyright (C) 2006 David Roden * * This program is free software; you can redistribute it and/or modify @@ -28,7 +28,7 @@ package de.todesbaum.util.freenet.fcp2; * is remembered as long as the node is running but not after restarts. * forever finally means that a request persists until it is * explicitely deleted. - * + * * @author David Roden <droden@gmail.com> * @version $Id$ * @see de.todesbaum.util.freenet.fcp2.ModifyPersistentRequest @@ -57,7 +57,7 @@ public final class Persistence { /** * Private constructor that creates a persistence option with the specified * name. - * + * * @param name * The name of the persistence option. */ @@ -67,7 +67,7 @@ public final class Persistence { /** * Returns the name of this persistence option. - * + * * @return The name of this persistence option */ public String getName() { @@ -77,7 +77,7 @@ public final class Persistence { /** * Returns a textual representation of this persistence option. The result * is identical to calling {@link #getName()}. - * + * * @return The name of this persistence option */ public String toString() { diff --git a/src/de/todesbaum/util/freenet/fcp2/PriorityClass.java b/src/de/todesbaum/util/freenet/fcp2/PriorityClass.java index 13b149e..8a8390e 100644 --- a/src/de/todesbaum/util/freenet/fcp2/PriorityClass.java +++ b/src/de/todesbaum/util/freenet/fcp2/PriorityClass.java @@ -1,5 +1,5 @@ /* - * todesbaum-lib - + * todesbaum-lib - * Copyright (C) 2006 David Roden * * This program is free software; you can redistribute it and/or modify @@ -26,7 +26,7 @@ package de.todesbaum.util.freenet.fcp2; * immediate mode large file downloads, not to disk), updatable * (updatable site checks), bulk (large file downloads to disk), * prefetch, minimum. - * + * * @author David Roden <droden@gmail.com> * @version $Id$ */ @@ -61,7 +61,7 @@ public final class PriorityClass { /** * Creates a new priority class with the specified name and value. - * + * * @param name * The name of the priority class * @param value @@ -74,7 +74,7 @@ public final class PriorityClass { /** * Returns the name of this priority class. - * + * * @return The name of this priority class */ public String getName() { @@ -83,7 +83,7 @@ public final class PriorityClass { /** * Returns the value of this priority class. - * + * * @return The value of this priority class */ public int getValue() { diff --git a/src/de/todesbaum/util/freenet/fcp2/RedirectFileEntry.java b/src/de/todesbaum/util/freenet/fcp2/RedirectFileEntry.java index cecb5a4..c4354c6 100644 --- a/src/de/todesbaum/util/freenet/fcp2/RedirectFileEntry.java +++ b/src/de/todesbaum/util/freenet/fcp2/RedirectFileEntry.java @@ -1,5 +1,5 @@ /* - * todesbaum-lib - + * todesbaum-lib - * Copyright (C) 2006 David Roden * * This program is free software; you can redistribute it and/or modify diff --git a/src/de/todesbaum/util/freenet/fcp2/Verbosity.java b/src/de/todesbaum/util/freenet/fcp2/Verbosity.java index 4214d9c..e64540f 100644 --- a/src/de/todesbaum/util/freenet/fcp2/Verbosity.java +++ b/src/de/todesbaum/util/freenet/fcp2/Verbosity.java @@ -1,5 +1,5 @@ /* - * todesbaum-lib - + * todesbaum-lib - * Copyright (C) 2006 David Roden * * This program is free software; you can redistribute it and/or modify diff --git a/src/de/todesbaum/util/image/IconLoader.java b/src/de/todesbaum/util/image/IconLoader.java index 793e8a0..d764991 100644 --- a/src/de/todesbaum/util/image/IconLoader.java +++ b/src/de/todesbaum/util/image/IconLoader.java @@ -3,12 +3,12 @@ * the terms of the GNU General Public License as published by the Free Software * Foundation; either version 2 of the License, or (at your option) any later * version. - * + * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. - * + * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/src/de/todesbaum/util/io/Closer.java b/src/de/todesbaum/util/io/Closer.java index b4481ac..ea99081 100644 --- a/src/de/todesbaum/util/io/Closer.java +++ b/src/de/todesbaum/util/io/Closer.java @@ -1,16 +1,16 @@ /* * todesbaum-lib - Copyright (C) 2006 David Roden - * + * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation; either version 2 of the License, or (at your option) any later * version. - * + * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. - * + * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place - Suite 330, Boston, MA 02111-1307, USA. @@ -35,7 +35,7 @@ import java.sql.Statement; * so that clean-up code can be written with less code. All methods check that * the given resource is not null before invoking the close() * method of the respective type. - * + * * @author David ‘Bombe&squo; * Roden * @version $Id$ @@ -44,7 +44,7 @@ public class Closer { /** * Closes the given result set. - * + * * @param resultSet * The result set to close * @see ResultSet#close() @@ -60,7 +60,7 @@ public class Closer { /** * Closes the given statement. - * + * * @param statement * The statement to close * @see Statement#close() @@ -76,7 +76,7 @@ public class Closer { /** * Closes the given connection. - * + * * @param connection * The connection to close * @see Connection#close() @@ -92,7 +92,7 @@ public class Closer { /** * Closes the given server socket. - * + * * @param serverSocket * The server socket to close * @see ServerSocket#close() @@ -108,7 +108,7 @@ public class Closer { /** * Closes the given socket. - * + * * @param socket * The socket to close * @see Socket#close() @@ -124,7 +124,7 @@ public class Closer { /** * Closes the given input stream. - * + * * @param inputStream * The input stream to close * @see InputStream#close() @@ -140,7 +140,7 @@ public class Closer { /** * Closes the given output stream. - * + * * @param outputStream * The output stream to close * @see OutputStream#close() @@ -156,7 +156,7 @@ public class Closer { /** * Closes the given reader. - * + * * @param reader * The reader to close * @see Reader#close() @@ -172,7 +172,7 @@ public class Closer { /** * Closes the given writer. - * + * * @param writer * The write to close * @see Writer#close() diff --git a/src/de/todesbaum/util/io/LineInputStream.java b/src/de/todesbaum/util/io/LineInputStream.java index b548afc..a49e876 100644 --- a/src/de/todesbaum/util/io/LineInputStream.java +++ b/src/de/todesbaum/util/io/LineInputStream.java @@ -1,5 +1,5 @@ /* - * todesbaum-lib - + * todesbaum-lib - * Copyright (C) 2006 David Roden * * This program is free software; you can redistribute it and/or modify @@ -29,7 +29,7 @@ import java.io.InputStream; * @version $Id$ */ public class LineInputStream extends FilterInputStream { - + private boolean skipLinefeed = false; private StringBuffer lineBuffer = new StringBuffer(); @@ -60,5 +60,5 @@ public class LineInputStream extends FilterInputStream { } return lineBuffer.toString(); } - + } diff --git a/src/de/todesbaum/util/io/ReplacingOutputStream.java b/src/de/todesbaum/util/io/ReplacingOutputStream.java index 17d8242..256714b 100644 --- a/src/de/todesbaum/util/io/ReplacingOutputStream.java +++ b/src/de/todesbaum/util/io/ReplacingOutputStream.java @@ -1,5 +1,5 @@ /* - * todesbaum-lib - + * todesbaum-lib - * Copyright (C) 2006 David Roden * * This program is free software; you can redistribute it and/or modify @@ -36,7 +36,7 @@ public class ReplacingOutputStream extends FilterOutputStream { private Map replacements = new HashMap(); private StringBuffer ringBuffer = new StringBuffer(); - + /** * @param out */ @@ -79,5 +79,5 @@ public class ReplacingOutputStream extends FilterOutputStream { } } } - + } diff --git a/src/de/todesbaum/util/io/StreamCopier.java b/src/de/todesbaum/util/io/StreamCopier.java index e79a900..dccd09a 100644 --- a/src/de/todesbaum/util/io/StreamCopier.java +++ b/src/de/todesbaum/util/io/StreamCopier.java @@ -3,12 +3,12 @@ * the terms of the GNU General Public License as published by the Free Software * Foundation; either version 2 of the License, or (at your option) any later * version. - * + * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. - * + * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place - Suite 330, Boston, MA 02111-1307, USA. @@ -23,7 +23,7 @@ import java.io.OutputStream; /** * Copies input from an {@link InputStream} to an {@link OutputStream}. - * + * * @author David Roden * @version $Id$ */ @@ -57,7 +57,7 @@ public class StreamCopier { /** * Creates a new StreamCopier with the specified parameters and the default * buffer size. - * + * * @param inputStream * The {@link InputStream} to read from * @param outputStream @@ -72,7 +72,7 @@ public class StreamCopier { /** * Creates a new StreamCopier with the specified parameters and the default * buffer size. - * + * * @param inputStream * The {@link InputStream} to read from * @param outputStream @@ -93,7 +93,7 @@ public class StreamCopier { * Copies the stream data. If the input stream is depleted before the * requested number of bytes have been read an {@link EOFException} is * thrown. - * + * * @throws EOFException * if the input stream is depleted before the requested number * of bytes has been read @@ -107,7 +107,7 @@ public class StreamCopier { /** * Copies length bytes from the inputStream to * the outputStream. - * + * * @param inputStream * The input stream to read from * @param outputStream @@ -124,7 +124,7 @@ public class StreamCopier { /** * Copies length bytes from the inputStream to * the outputStream using a buffer with the specified size - * + * * @param inputStream * The input stream to read from * @param outputStream diff --git a/src/de/todesbaum/util/io/TempFileInputStream.java b/src/de/todesbaum/util/io/TempFileInputStream.java index ba86151..4213deb 100644 --- a/src/de/todesbaum/util/io/TempFileInputStream.java +++ b/src/de/todesbaum/util/io/TempFileInputStream.java @@ -1,5 +1,5 @@ /* - * todesbaum-lib - + * todesbaum-lib - * Copyright (C) 2006 David Roden * * This program is free software; you can redistribute it and/or modify diff --git a/src/de/todesbaum/util/mime/DefaultMIMETypes.java b/src/de/todesbaum/util/mime/DefaultMIMETypes.java index c821912..9e380a5 100644 --- a/src/de/todesbaum/util/mime/DefaultMIMETypes.java +++ b/src/de/todesbaum/util/mime/DefaultMIMETypes.java @@ -1,4 +1,4 @@ -/* taken from freenet (http://www.freenetproject.org/) */ +/* taken from freenet (http://www.freenetproject.org/) */ package de.todesbaum.util.mime; import java.util.HashMap; @@ -10,23 +10,23 @@ import java.util.Vector; * Holds the default MIME types. */ public class DefaultMIMETypes { - + /** Default MIME type - what to set it to if we don't know any better */ public static final String DEFAULT_MIME_TYPE = "application/octet-stream"; - + /** MIME types: number -> name */ private static List mimeTypesByNumber = new Vector(); - + /** MIME types: name -> number */ private static Map mimeTypesByName = new HashMap(); - + /** MIME types by extension. One extension maps to one MIME type, but not necessarily * the other way around. */ private static Map mimeTypesByExtension = new HashMap(); - + /** Primary extension by MIME type number. */ private static Map primaryExtensionByMimeNumber = new HashMap(); - + /** * Add a MIME type, without any extensions. * @param number The number of the MIME type for compression. This *must not change* @@ -73,7 +73,7 @@ public class DefaultMIMETypes { } if(outExtension != null) primaryExtensionByMimeNumber.put(t, outExtension); - + } /** @@ -91,7 +91,7 @@ public class DefaultMIMETypes { protected static synchronized void addMIMEType(short number, String type, String extensions, String outExtension) { addMIMEType(number, type, extensions.split(" "), outExtension); } - + /** * Get a known MIME type by number. */ @@ -100,7 +100,7 @@ public class DefaultMIMETypes { return null; return mimeTypesByNumber.get(x); } - + /** * Get the number of a MIME type, or -1 if it is not in the table of known MIME * types, in which case it will have to be sent uncompressed. @@ -110,13 +110,13 @@ public class DefaultMIMETypes { if(x != null) return x.shortValue(); return -1; } - + /* From toad's /etc/mime.types - * cat /etc/mime.types | sed "/^$/d;/#/d" | tr --squeeze '\t' ' ' | - * (y=0; while read x; do echo "$x" | + * cat /etc/mime.types | sed "/^$/d;/#/d" | tr --squeeze '\t' ' ' | + * (y=0; while read x; do echo "$x" | * sed -n "s/^\([^ ]*\)$/addMIMEType\($y, \"\1\"\);/p;s/^\([^ (),]\+\) \(.*\)$/addMIMEType\($y, \"\1\", \"\2\"\);/p;"; y=$((y+1)); done) */ - + static { addMIMEType((short) 0, "application/activemessage"); addMIMEType((short) 1, "application/andrew-inset", "ez"); @@ -807,7 +807,7 @@ public class DefaultMIMETypes { addMIMEType((short) 686, "x-conference/x-cooltalk", "ice"); addMIMEType((short) 687, "x-world/x-vrml", "vrm vrml wrl"); } - + /** Guess a MIME type from a filename */ public static String guessMIMEType(String arg) { int x = arg.lastIndexOf('.'); @@ -826,7 +826,7 @@ public class DefaultMIMETypes { if(typeNumber < 0) return null; return primaryExtensionByMimeNumber.get(typeNumber); } - + public static String[] getAllMIMETypes() { return mimeTypesByNumber.toArray(new String[mimeTypesByNumber.size()]); } diff --git a/src/de/todesbaum/util/swing/SortedListModel.java b/src/de/todesbaum/util/swing/SortedListModel.java index eebf86a..0127c06 100644 --- a/src/de/todesbaum/util/swing/SortedListModel.java +++ b/src/de/todesbaum/util/swing/SortedListModel.java @@ -1,5 +1,5 @@ /* - * todesbaum-lib - + * todesbaum-lib - * Copyright (C) 2006 David Roden * * This program is free software; you can redistribute it and/or modify @@ -34,9 +34,9 @@ import javax.swing.AbstractListModel; * @version $Id$ */ public class SortedListModel extends AbstractListModel implements List { - + private List elements = new ArrayList(); - + /** * {@inheritDoc} */ diff --git a/src/de/todesbaum/util/swing/TLabel.java b/src/de/todesbaum/util/swing/TLabel.java index 65474ac..6515627 100644 --- a/src/de/todesbaum/util/swing/TLabel.java +++ b/src/de/todesbaum/util/swing/TLabel.java @@ -1,5 +1,5 @@ /* - * todesbaum-lib - + * todesbaum-lib - * Copyright (C) 2006 David Roden * * This program is free software; you can redistribute it and/or modify @@ -43,7 +43,7 @@ public class TLabel extends JLabel { public TLabel(Icon image) { super(image); } - + public TLabel(Icon image, int mnemonic, Component labelFor) { super(image); setDisplayedMnemonic(mnemonic); diff --git a/src/de/todesbaum/util/swing/TWizard.java b/src/de/todesbaum/util/swing/TWizard.java index e865ed4..3eb5062 100644 --- a/src/de/todesbaum/util/swing/TWizard.java +++ b/src/de/todesbaum/util/swing/TWizard.java @@ -1,5 +1,5 @@ /* - * todesbaum-lib - + * todesbaum-lib - * Copyright (C) 2006 David Roden * * This program is free software; you can redistribute it and/or modify @@ -45,9 +45,9 @@ import javax.swing.border.EmptyBorder; * @version $Id$ */ public class TWizard extends JFrame implements WindowListener { - + protected List wizardListeners = new ArrayList(); - + private Action previousAction; private Action nextAction; private Action quitAction; @@ -55,46 +55,46 @@ public class TWizard extends JFrame implements WindowListener { private JPanel pagePanel; private JLabel pageHeading; private JLabel pageDescription; - + protected void frameInit() { super.frameInit(); setResizable(false); addWindowListener(this); setDefaultCloseOperation(DO_NOTHING_ON_CLOSE); createActions(); - + pageIcon = new JLabel(); pageIcon.setVerticalAlignment(SwingConstants.TOP); pageHeading = new JLabel(); pageHeading.setFont(pageHeading.getFont().deriveFont(pageHeading.getFont().getSize() * 2.0f).deriveFont(Font.BOLD)); pageDescription = new JLabel(); - + JPanel contentPane = new JPanel(new BorderLayout(12, 12)); contentPane.setBorder(new EmptyBorder(12, 12, 12, 12)); - + JPanel topPanel = new JPanel(new BorderLayout(12, 12)); contentPane.add(topPanel, BorderLayout.PAGE_START); - + topPanel.add(pageIcon, BorderLayout.LINE_START); - + JPanel textPanel = new JPanel(new BorderLayout(12, 12)); topPanel.add(textPanel, BorderLayout.CENTER); textPanel.add(pageHeading, BorderLayout.PAGE_START); textPanel.add(pageDescription, BorderLayout.CENTER); - + pagePanel = new JPanel(new BorderLayout(12, 12)); contentPane.add(pagePanel, BorderLayout.CENTER); - + JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.TRAILING, 12, 12)); buttonPanel.setBorder(new EmptyBorder(-12, -12, -12, -12)); buttonPanel.add(new JButton(previousAction)); buttonPanel.add(new JButton(nextAction)); buttonPanel.add(new JButton(quitAction)); contentPane.add(buttonPanel, BorderLayout.PAGE_END); - + setContentPane(contentPane); } - + @Override public void pack() { super.pack(); @@ -102,57 +102,57 @@ public class TWizard extends JFrame implements WindowListener { setLocation((screenSize.width - getWidth()) / 2, (screenSize.height - getHeight()) / 2); // System.out.println("resized to: " + getWidth() + "x" + getHeight()); } - + private void createActions() { previousAction = new AbstractAction("Previous") { public void actionPerformed(ActionEvent actionEvent) { actionPrevious(); } }; - + nextAction = new AbstractAction("Next") { public void actionPerformed(ActionEvent actionEvent) { actionNext(); } }; - + quitAction = new AbstractAction("Quit") { public void actionPerformed(ActionEvent actionEvent) { actionQuit(); } }; } - + public void addWizardListener(WizardListener wizardListener) { wizardListeners.add(wizardListener); } - + public void removeWizardListener(WizardListener wizardListener) { wizardListeners.remove(wizardListener); } - + protected void fireWizardPreviousPressed() { for (WizardListener wizardListener: wizardListeners) { wizardListener.wizardPreviousPressed(this); } } - + protected void fireWizardNextPressed() { for (WizardListener wizardListener: wizardListeners) { wizardListener.wizardNextPressed(this); } } - + protected void fireWizardQuitPressed() { for (WizardListener wizardListener: wizardListeners) { wizardListener.wizardQuitPressed(this); } } - + public void setIcon(Icon icon) { pageIcon.setIcon(icon); } - + public void setPage(TWizardPage page) { setVisible(false); pageHeading.setText(page.getHeading()); @@ -169,35 +169,35 @@ public class TWizard extends JFrame implements WindowListener { setTitle(page.getHeading()); setVisible(true); } - + public TWizardPage getPage() { return (TWizardPage) pagePanel.getComponent(0); } - + public void setPreviousEnabled(boolean previousEnabled) { previousAction.setEnabled(previousEnabled); } - + public void setPreviousName(String previousName) { previousAction.putValue(Action.NAME, previousName); } - + public void setNextEnabled(boolean nextEnabled) { nextAction.setEnabled(nextEnabled); } - + public void setNextName(String nextName) { nextAction.putValue(Action.NAME, nextName); } - + public void setQuitEnabled(boolean quitEnabled) { quitAction.setEnabled(quitEnabled); } - + public void setQuitName(String quitName) { quitAction.putValue(Action.NAME, quitName); } - + protected void actionPrevious() { fireWizardPreviousPressed(); } @@ -205,11 +205,11 @@ public class TWizard extends JFrame implements WindowListener { protected void actionNext() { fireWizardNextPressed(); } - + protected void actionQuit() { fireWizardQuitPressed(); } - + // // INTERFACE WindowListener // diff --git a/src/de/todesbaum/util/swing/TWizardPage.java b/src/de/todesbaum/util/swing/TWizardPage.java index 3ccda84..be51b7e 100644 --- a/src/de/todesbaum/util/swing/TWizardPage.java +++ b/src/de/todesbaum/util/swing/TWizardPage.java @@ -1,5 +1,5 @@ /* - * todesbaum-lib - + * todesbaum-lib - * Copyright (C) 2006 David Roden * * This program is free software; you can redistribute it and/or modify diff --git a/src/de/todesbaum/util/swing/WizardListener.java b/src/de/todesbaum/util/swing/WizardListener.java index bfb19c3..f0ab6b0 100644 --- a/src/de/todesbaum/util/swing/WizardListener.java +++ b/src/de/todesbaum/util/swing/WizardListener.java @@ -1,5 +1,5 @@ /* - * todesbaum-lib - + * todesbaum-lib - * Copyright (C) 2006 David Roden * * This program is free software; you can redistribute it and/or modify @@ -31,5 +31,5 @@ public interface WizardListener extends EventListener { public void wizardNextPressed(TWizard wizard); public void wizardPreviousPressed(TWizard wizard); public void wizardQuitPressed(TWizard wizard); - + } diff --git a/src/de/todesbaum/util/xml/SimpleXML.java b/src/de/todesbaum/util/xml/SimpleXML.java index d400ed8..a45f3d9 100644 --- a/src/de/todesbaum/util/xml/SimpleXML.java +++ b/src/de/todesbaum/util/xml/SimpleXML.java @@ -32,7 +32,7 @@ import org.w3c.dom.Text; /** * SimpleXML is a helper class to construct XML trees in a fast and simple way. Construct a new XML tree by calling {@link #SimpleXML(String)} and * append new nodes by calling {@link #append(String)}. - * + * * @author David Roden <droden@gmail.com> * @version $Id:SimpleXML.java 221 2006-03-06 14:46:49Z bombe $ */ @@ -62,7 +62,7 @@ public class SimpleXML { /** * Constructs a new XML node with the specified name. - * + * * @param name * The name of the new node */ @@ -73,7 +73,7 @@ public class SimpleXML { /** * Returns the child node of this node with the specified name. If there are several child nodes with the specified name only the first node is * returned. - * + * * @param nodeName * The name of the child node * @return The child node, or null if there is no child node with the specified name @@ -91,11 +91,11 @@ public class SimpleXML { * Returns the child node that is specified by the names. The first element of nodeNames is the name of the child node of this * node, the second element of nodeNames is the name of a child node's child node, and so on. By using this method you can descend * into an XML tree pretty fast. - * + * *

 	 * SimpleXML deepNode = topNode.getNodes(new String[] { "person", "address", "number" });
 	 * 
- * + * * @param nodeNames * @return A node that is a deep child of this node, or null if the specified node does not eixst */ @@ -109,7 +109,7 @@ public class SimpleXML { /** * Returns all child nodes of this node. - * + * * @return All child nodes of this node */ public SimpleXML[] getNodes() { @@ -118,7 +118,7 @@ public class SimpleXML { /** * Returns all child nodes of this node with the specified name. If there are no child nodes with the specified name an empty array is returned. - * + * * @param nodeName * The name of the nodes to retrieve, or null to retrieve all nodes * @return All child nodes with the specified name @@ -135,11 +135,11 @@ public class SimpleXML { /** * Appends a new XML node with the specified name and returns the new node. With this method you can create deep structures very fast. - * + * *
 	 * SimpleXML mouseNode = topNode.append("computer").append("bus").append("usb").append("mouse");
 	 * 
- * + * * @param nodeName * The name of the node to append as a child to this node * @return The new node @@ -150,7 +150,7 @@ public class SimpleXML { /** * Appends a new XML node with the specified name and value and returns the new node. - * + * * @param nodeName * The name of the node to append * @param nodeValue @@ -163,7 +163,7 @@ public class SimpleXML { /** * Appends the node with all its child nodes to this node and returns the child node. - * + * * @param newChild * The node to append as a child * @return The child node that was appended @@ -176,31 +176,31 @@ public class SimpleXML { public void remove(SimpleXML child) { children.remove(child); } - + public void remove(String childName) { SimpleXML child = getNode(childName); if (child != null) { remove(child); } } - + public void replace(String childName, String value) { remove(childName); append(childName, value); } - + public void replace(SimpleXML childNode) { remove(childNode.getName()); append(childNode); } - + public void removeAll() { children.clear(); } /** * Sets the value of this node. - * + * * @param nodeValue * The new value of this node * @return This node @@ -212,7 +212,7 @@ public class SimpleXML { /** * Returns the name of this node. - * + * * @return The name of this node */ public String getName() { @@ -221,7 +221,7 @@ public class SimpleXML { /** * Returns the value of this node. - * + * * @return The value of this node */ public String getValue() { @@ -230,7 +230,7 @@ public class SimpleXML { /** * Creates a {@link Document} from this node and all its child nodes. - * + * * @return The {@link Document} created from this node */ public Document getDocument() { @@ -250,7 +250,7 @@ public class SimpleXML { /** * Appends all children of this node to the specified {@link Element}. If a node has a value that is not null the value is * appended as a text node. - * + * * @param rootElement * The element to attach this node's children to */ @@ -269,7 +269,7 @@ public class SimpleXML { /** * Creates a SimpleXML node from the specified {@link Document}. The SimpleXML node of the document's top-level node is returned. - * + * * @param document * The {@link Document} to create a SimpleXML node from * @return The SimpleXML node created from the document's top-level node @@ -282,7 +282,7 @@ public class SimpleXML { /** * Appends the child nodes of the specified {@link Document} to this node. Text nodes are converted into a node's value. - * + * * @param xmlDocument * The SimpleXML node to append the child nodes to * @param document diff --git a/src/de/todesbaum/util/xml/XML.java b/src/de/todesbaum/util/xml/XML.java index d84fd75..28f8298 100644 --- a/src/de/todesbaum/util/xml/XML.java +++ b/src/de/todesbaum/util/xml/XML.java @@ -3,12 +3,12 @@ * the terms of the GNU General Public License as published by the Free Software * Foundation; either version 2 of the License, or (at your option) any later * version. - * + * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. - * + * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place - Suite 330, Boston, MA 02111-1307, USA. @@ -42,7 +42,7 @@ import org.w3c.dom.Document; /** * Contains method to transform DOM XML trees to byte arrays and vice versa. - * + * * @author David Roden <droden@gmail.com> * @version $Id:XML.java 221 2006-03-06 14:46:49Z bombe $ */ @@ -63,7 +63,7 @@ public class XML { /** * Returns a document builder factory. If possible the cached instance will be returned. - * + * * @return A document builder factory */ private static DocumentBuilderFactory getDocumentBuilderFactory() { @@ -76,7 +76,7 @@ public class XML { /** * Returns a document builder. If possible the cached instance will be returned. - * + * * @return A document builder */ private static DocumentBuilder getDocumentBuilder() { @@ -92,7 +92,7 @@ public class XML { /** * Returns a transformer factory. If possible the cached instance will be returned. - * + * * @return A transformer factory */ private static TransformerFactory getTransformerFactory() { @@ -105,7 +105,7 @@ public class XML { /** * Creates a new XML document. - * + * * @return A new XML document */ public static Document createDocument() { @@ -114,7 +114,7 @@ public class XML { /** * Transforms the DOM XML document into a byte array. - * + * * @param document * The document to transform * @return The byte array containing the XML representation @@ -143,7 +143,7 @@ public class XML { /** * Transforms the byte array into a DOM XML document. - * + * * @param data * The byte array to parse * @return The DOM XML document