Created
April 17, 2012 02:37
-
-
Save jamalsa/2403038 to your computer and use it in GitHub Desktop.
Menangani message ASCIIHeader
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Mengirim message dengan NBOMinusHeader | |
int tLength = tRequestStream.length(); | |
String tStrLength = String.format("%04d", tLength); // Padding length jadi 4, misal 100 jadi 0100, 55 jadi 0055 | |
tRequestByteStream.write(tStrLength.getBytes()); | |
tRequestByteStream.write(tRequestStream.getBytes()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment