public static int decodeInt(byte[] bytes, int offset) {
    return (((bytes[offset + 0]) << 24) & 0xFF000000) | (((bytes[offset + 1]) << 16) & 0x00FF0000)
        | (((bytes[offset + 2]) << 8) & 0x0000FF00) | ((bytes[offset + 3]) & 0x000000FF);
  }
Like getString but will also check a cache of frequently serialized strings.
The result will be added to the cache if it is not already in it.
NOTE: only call this for strings that are reused often (like region names).
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/Part.java