elharo commented on code in PR #566:
URL: https://github.com/apache/commons-io/pull/566#discussion_r1467733794
##########
src/main/java/org/apache/commons/io/EndianUtils.java:
##########
@@ -182,13 +194,14 @@ public static short readSwappedShort(final InputStream
input) throws IOException
}
/**
- * Reads an unsigned integer (32-bit) value from a byte array at a given
- * offset. The value is converted to the opposed endian system while
- * reading.
+ * Reads a little endian unsigned integer (32-bit) value from a byte array
at a given
Review Comment:
Since Java's ints are signed you can't fit the unsigned int values from ~2.2
billion to ~4 billion into an int, so you have to return a long. The long will
always be <= 2^32, but might be greater than Integer.MAX_INT. Not sure how much
of that to say here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]