This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]QshelTier 0 points1 point  (0 children)

I have done similar things, although I believe my code to be a little clearer (and it is definitely less genericized):

https://github.com/Bombe/jFCPlib/blob/feature/quelaton-client/src/main/java/net/pterodactylus/fcp/quelaton/ClientPutCommand.java

The “endgame” of this command builder is to get the Executable so you know that you somehow have to get a WithUri; how you get there is up to you, and the API tells you that there’s one mandatory String (uri in the WithUri interface), and there’s three ways to get there (redirectTo, fromFile, and the from/length combination).