1 package net.pterodactylus.fcp.quelaton;
4 import java.io.InputStream;
5 import java.util.Optional;
6 import java.util.function.Consumer;
8 import net.pterodactylus.fcp.Key;
11 * FCP command that inserts data into Freenet.
13 * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
15 public interface ClientPutCommand {
17 ClientPutCommand onKeyGenerated(Consumer<String> keyGenerated);
18 ClientPutCommand named(String targetFilename);
19 WithUri redirectTo(String uri);
20 WithUri from(File file);
21 WithLength from(InputStream inputStream);
23 interface WithLength {
25 WithUri length(long length);
31 Executable<Optional<Key>> uri(String uri);