static byte[] readFully(DataInput stream, int len) throws IOException {
        if (len == 0) {
            return null;
        }

        byte[] data = new byte[len];
        stream.readFully(data);
        return data;
    }
static byte [ ] readFully ( DataInput stream , int len ) throws IOException { if ( len == 0 ) { return null ; } byte [ ] data = new byte [ len ] ; stream . readFully ( data ) ; return data ; }
TODO: Util method?