public void sendInput(byte[] buf) throws IOException {
logger.debug("Sending WinRM Send Input request for command {} in shell {}", commandId, shellId);
final Element bodyContent = DocumentHelper.createElement(QName.get("Send", Namespaces.NS_WIN_SHELL));
final Base64 base64 = new Base64();
bodyContent.addElement(QName.get("Stream", Namespaces.NS_WIN_SHELL)).addAttribute("Name", "stdin").addAttribute("CommandId", commandId).addText(base64.encodeAsString(buf));
final Document requestDocument = getRequestDocument(Action.WS_SEND, ResourceURI.RESOURCE_URI_CMD, null, bodyContent);
sendRequest(requestDocument, SoapAction.SEND);
logger.debug("Sent WinRM Send Input request for command {} in shell {}", commandId, shellId);
}