ByteBuffer tsPasswordCredsBuf = new ByteBuffer(4096, true);
TSPasswordCreds tsPasswordCreds = new TSPasswordCreds("credentials");
tsPasswordCreds.domainName.value = new ByteBuffer(ntlmState.domain.getBytes(RdpConstants.CHARSET_16));
tsPasswordCreds.userName.value = new ByteBuffer(ntlmState.user.getBytes(RdpConstants.CHARSET_16));
tsPasswordCreds.password.value = new ByteBuffer(ntlmState.password.getBytes(RdpConstants.CHARSET_16));
tsPasswordCreds.writeTag(tsPasswordCredsBuf);
tsPasswordCredsBuf.trimAtCursor();
//* DEBUG */System.out.println("TSPasswordCreds:\n" + tsPasswordCredsBuf.dump());
tsCredentials.credentials.value = tsPasswordCredsBuf;