Here you can find the source of readUint32(final DataInput di)
public static long readUint32(final DataInput di) throws IOException
//package com.java2s; /*// w w w. j a va2 s . c o m * Copyright (c) 2017 Eric A. Snell * * This file is part of eAlvaTag. * * eAlvaTag is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser * General Public License as published by the Free Software Foundation, either version 3 of the License, * or (at your option) any later version. * * eAlvaTag is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License along with eAlvaTag. If not, * see <http://www.gnu.org/licenses/>. */ import java.io.DataInput; import java.io.IOException; import java.nio.ByteBuffer; public class Main { /** * Read a 32-bit big-endian unsigned integer using a DataInput. * <p> * Reads 4 bytes but returns as long */ public static long readUint32(final DataInput di) throws IOException { final byte[] buf8 = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; di.readFully(buf8, 4, 4); return ByteBuffer.wrap(buf8).getLong(); } }