Created
November 22, 2016 17:47
-
-
Save linuxenko/49c5f21bf88982c5852170a0879c3c8b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public long getUInt32() throws EOFException, IOException { | |
byte[] bytes = getBytes(4); | |
long value = bytes[0] & 0xFF; | |
value |= (bytes[1] << 8) & 0xFFFF; | |
value |= (bytes[2] << 16) & 0xFFFFFF; | |
value |= (bytes[3] << 24) & 0xFFFFFFFF; | |
return value; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment