(String command, Argument args)
| 321 | } |
| 322 | |
| 323 | public String writeCommand(String command, Argument args) |
| 324 | throws IOException, ProtocolException { |
| 325 | // assert Thread.holdsLock(this); |
| 326 | // can't assert because it's called from constructor |
| 327 | String tag = tagPrefix + Integer.toString(tagCounter++); // unique tag |
| 328 | |
| 329 | output.writeBytes(tag + " " + command); |
| 330 | |
| 331 | if (args != null) { |
| 332 | output.write(' '); |
| 333 | args.write(this); |
| 334 | } |
| 335 | |
| 336 | output.write(CRLF); |
| 337 | output.flush(); |
| 338 | return tag; |
| 339 | } |
| 340 | |
| 341 | /** |
| 342 | * Send a command to the server. Collect all responses until either |
no test coverage detected