cdm/src/main/java/ucar/unidata/io/RandomAccessFile.java
public final int readIntUnbuffered(long pos) throws IOException {
    byte[] bb = new byte[4];
    read_(pos, bb, 0, 4);
    int ch1 = bb[0] & 0xff;
    int ch2 = bb[1] & 0xff;
    int ch3 = bb[2] & 0xff;
    int ch4 = bb[3] & 0xff;
    if ((ch1 | ch2 | ch3 | ch4) < 0) {
      throw new EOFException();
    }

    if (bigEndian) {
      return ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + (ch4));
    } else {
      return ((ch4 << 24) + (ch3 << 16) + (ch2 << 8) + (ch1));
    }
  }
public final int readIntUnbuffered(long pos) throws IOException {
    byte[] bb = new byte[4];
    read_(pos, bb, 0, 4);
    int ch1 = bb[0] & 0xff;
    int ch2 = bb[1] & 0xff;
    int ch3 = bb[2] & 0xff;
    int ch4 = bb[3] & 0xff;
    if ((ch1 | ch2 | ch3 | ch4) < 0) {
      throw new EOFException();
    }

    if (bigEndian) {
      return ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + (ch4));
    } else {
      return ((ch4 << 24) + (ch3 << 16) + (ch2 << 8) + (ch1));
    }
  }
Read an integer at the given position, bypassing all buffering.

@param pos read a byte at this position
@return The int that was read
@throws IOException if an I/O error occurs.