cdm/src/main/java/ucar/unidata/io/BeLeDataInputStream.java
public final void readLELongs(long lbuf[], int n) throws IOException {
    int nLeft = n;
    int lCount = 0;
    int nToRead = kLongs;
    while (nLeft > 0) {
      if (nToRead > nLeft)
        nToRead = nLeft;
      readFully(byteWorkSpace, 0, 8 * nToRead);
      int j = 0;
      for (int i = 0; i < nToRead; i++) {
        lbuf[lCount++] =
                (long) (byteWorkSpace[j] & 0xff) |
                        (long) (byteWorkSpace[j + 1] & 0xff) << 8 |
                        (long) (byteWorkSpace[j + 2] & 0xff) << 16 |
                        (long) (byteWorkSpace[j + 3] & 0xff) << 24 |
                        (long) (byteWorkSpace[j + 4] & 0xff) << 32 |
                        (long) (byteWorkSpace[j + 5] & 0xff) << 40 |
                        (long) (byteWorkSpace[j + 6] & 0xff) << 48 |
                        (long) (byteWorkSpace[j + 7] & 0xff) << 56;
        j += 8;
      }
      nLeft -= nToRead;
    }
  }
public final void readLELongs(long lbuf[], int n) throws IOException {
    int nLeft = n;
    int lCount = 0;
    int nToRead = kLongs;
    while (nLeft > 0) {
      if (nToRead > nLeft)
        nToRead = nLeft;
      readFully(byteWorkSpace, 0, 8 * nToRead);
      int j = 0;
      for (int i = 0; i < nToRead; i++) {
        lbuf[lCount++] =
                (long) (byteWorkSpace[j] & 0xff) |
                        (long) (byteWorkSpace[j + 1] & 0xff) << 8 |
                        (long) (byteWorkSpace[j + 2] & 0xff) << 16 |
                        (long) (byteWorkSpace[j + 3] & 0xff) << 24 |
                        (long) (byteWorkSpace[j + 4] & 0xff) << 32 |
                        (long) (byteWorkSpace[j + 5] & 0xff) << 40 |
                        (long) (byteWorkSpace[j + 6] & 0xff) << 48 |
                        (long) (byteWorkSpace[j + 7] & 0xff) << 56;
        j += 8;
      }
      nLeft -= nToRead;
    }
  }
public final void readLELongs ( long lbuf [ ] , int n ) throws IOException { int nLeft = n ; int lCount = 0 ; int nToRead = kLongs ; while ( nLeft > 0 ) { if ( nToRead > nLeft ) nToRead = nLeft ; readFully ( byteWorkSpace , 0 , 8 * nToRead ) ; int j = 0 ; for ( int i = 0 ; i < nToRead ; i ++ ) { lbuf [ lCount ++ ] = ( long ) ( byteWorkSpace [ j ] & 0xff ) | ( long ) ( byteWorkSpace [ j + 1 ] & 0xff ) << 8 | ( long ) ( byteWorkSpace [ j + 2 ] & 0xff ) << 16 | ( long ) ( byteWorkSpace [ j + 3 ] & 0xff ) << 24 | ( long ) ( byteWorkSpace [ j + 4 ] & 0xff ) << 32 | ( long ) ( byteWorkSpace [ j + 5 ] & 0xff ) << 40 | ( long ) ( byteWorkSpace [ j + 6 ] & 0xff ) << 48 | ( long ) ( byteWorkSpace [ j + 7 ] & 0xff ) << 56 ; j += 8 ; } nLeft -= nToRead ; } }
Reads <code>n</code> little-endian longs from a random access file.
<p/>
<p> This method is provided for speed when accessing a number
of consecutive values of the same type.

@param lbuf the buffer into which the longs are read
@param n    the number of little-endian longs to read
Reads <code > n< / code > little - endian longs from a random access file . <p / > <p > This method is provided for speed when accessing a number of consecutive values of the same type .