Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as Java by JavaDude ( 17 years ago )
public byte[] serverNameContains(String strServerName)
{
byte[] byteArrNewQuery;
int serverNameLen = Math.min(strServerName.length, 15);
String strServerNameSub = strServerName.substring(0, serverNameLen);
byteArrNewQuery = new byte[10 + serverNameLen + 1]; // max length is 25 bytes
// Add bytes from bytesQuery to new byte-array: byteArrNewQuery
System.arraycopy(bytesQuery, 0, byteArrNewQuery, 0, bytesQuery.length);
// Add strServerName to byte-array
// Start at postion 10 (end at position 24)
byte[] byteArrServerName = strServerNameSub.getBytes();
byteArrNewQuery[9] = 0x01; // Server name contains ...
byteArrNewQuery[byteArrNewQuery.length] = 0x00; // Last byte must be 0x00
return byteArrNewQuery;
}
Revise this Paste
Parent: 8498