Is there already a way to compute the expression in the subject without the ByteBuffer allocation? I saw quite a few equivalent formulations in the OpenJDK sources, and perhaps it's time to add a standardized solution. Should this go into DataInputStream, or java.lang.Integer and friends? -- Florian Weimer / Red Hat Product Security