Listing 1. Excerpt from the Java DataInputStream class, showing parts of the byte alignment and ordering code, which are extremely slow. The DataOutputStream implementation has a similar problem.