// Let me explain a history about OrenetaDataInputStream.
// Once upon a time, there was a java programmer (aka Abel),
// who extended DataInputStream Class to support reading of
// complex data structures, as Inet4 and Inet6 address.
// He used the ‘read’ method of DataInput Stream, and told
// him to read ‘x’ bytes of data, as ‘x’ was the size of the
// data he wanted to read. But sometimes, extrange data
// appeared in the java application. He wondered from
// where it came, but he didn’t discovered until debugged
// the C server, captured the network packets and finally
// debugged the OrenetaDataInputStream Class. He spent
// many days and many hairs, but finally he knowed tha he
// must use the method ‘readFully’, that blocks until it read
// ‘x’ bytes. He congratulated himself and enjoyed it with
// cheers of red wine with his friends. (22-07-2003).
Source: Direct link to the source codeSoftware: OrenetaProgramming language: Java