Convert the client parameters into an argument list for the ID command.
(Map<String,String> clientParams)
| 80 | * Convert the client parameters into an argument list for the ID command. |
| 81 | */ |
| 82 | static Argument getArgumentList(Map<String,String> clientParams) { |
| 83 | Argument arg = new Argument(); |
| 84 | if (clientParams == null) { |
| 85 | arg.writeAtom("NIL"); |
| 86 | return arg; |
| 87 | } |
| 88 | Argument list = new Argument(); |
| 89 | // add params to list |
| 90 | for (Map.Entry<String, String> e : clientParams.entrySet()) { |
| 91 | list.writeNString(e.getKey()); // assume these are ASCII only |
| 92 | list.writeNString(e.getValue()); |
| 93 | } |
| 94 | arg.writeArgument(list); |
| 95 | return arg; |
| 96 | } |
| 97 | } |
no test coverage detected