2 * jSite2 - TestDDAResponse.java -
3 * Copyright © 2008 David Roden
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 package net.pterodactylus.util.fcp;
23 * A “TestDDAResponse” is sent to let the node know that either created a file
24 * with the content from {@link TestDDAReply#getContentToWrite()} or that you
25 * read the content of the file given by {@link TestDDAReply#getReadFilename()}.
27 * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
30 public class TestDDAResponse extends FcpMessage {
33 * Creates a new “TestDDAResponse” message that signals that you created the
34 * file given by {@link TestDDAReply#getWriteFilename()} and wrote the
35 * contents given by {@link TestDDAReply#getContentToWrite()} to it.
38 * The directory from the {@link TestDDARequest} command
40 public TestDDAResponse(String directory) {
41 this(directory, null);
45 * Creates a new “TestDDAResponse” message that signals that you created the
46 * file given by {@link TestDDAReply#getWriteFilename()} with the contents
47 * given by {@link TestDDAReply#getContentToWrite()} to it (when you
48 * specified that you want to write to the directory) and/or that you read
49 * the file given by {@link TestDDAReply#getReadFilename()} (when you
50 * specified you wanted to read the directory).
53 * The directory from the {@link TestDDARequest} command
55 * The read content, or <code>null</code> if you did not
58 public TestDDAResponse(String directory, String readContent) {
59 super("TestDDAResponse");
60 if (readContent != null) {
61 setField("ReadContent", readContent);