Showing posts with label java. Show all posts
Showing posts with label java. Show all posts

Tuesday, April 19, 2011

Ajax long connect using server heart beat to check client connect if it is closed

Using a trick HTTP response header

HTTP/1.1 200 OK
Server: xxx
Beat: Waiting.................................... // trick
Connection:Close
Content-length:255
Content-type:text/xml
Date:Wed Apr 20 12:01:17 EST 2011
Expires:Sun, 24 Apr 1981 01:29:32 GMT

Friday, January 28, 2011

Java binary data process class DataInputStream

The good sample for binary data processing

Thursday, January 27, 2011

Search a byte array for a byte sequence

The Knuth-Morris-Pratt Pattern Matching Algorithm can be used to search a byte array.
http://helpdesk.objects.com.au/java/search-a-byte-array-for-a-byte-sequence