visad/src/main/java/ucar/nc2/iosp/gempak/GempakGridReader.java
private void getNextByte() throws IOException {
    if (!needToSwap) {
      // Get the next byte from the RandomAccessFile
      bitBuf = rf.read();
    } else {
      if (next == 3) {
        bitBuf = ch3;
      } else if (next == 2) {
        bitBuf = ch2;
      } else if (next == 1) {
        bitBuf = ch1;
      } else {
        ch1 = rf.read();
        ch2 = rf.read();
        ch3 = rf.read();
        ch4 = rf.read();
        bitBuf = ch4;
        next = 4;
      }
      next--;
    }
  }
private void getNextByte() throws IOException {
    if (!needToSwap) {
      // Get the next byte from the RandomAccessFile
      bitBuf = rf.read();
    } else {
      if (next == 3) {
        bitBuf = ch3;
      } else if (next == 2) {
        bitBuf = ch2;
      } else if (next == 1) {
        bitBuf = ch1;
      } else {
        ch1 = rf.read();
        ch2 = rf.read();
        ch3 = rf.read();
        ch4 = rf.read();
        bitBuf = ch4;
        next = 4;
      }
      next--;
    }
  }
private void getNextByte ( ) throws IOException { if ( ! needToSwap ) { // Get the next byte from the RandomAccessFile bitBuf = rf . read ( ) ; } else { if ( next == 3 ) { bitBuf = ch3 ; } else if ( next == 2 ) { bitBuf = ch2 ; } else if ( next == 1 ) { bitBuf = ch1 ; } else { ch1 = rf . read ( ) ; ch2 = rf . read ( ) ; ch3 = rf . read ( ) ; ch4 = rf . read ( ) ; bitBuf = ch4 ; next = 4 ; } next -- ; } }
Get the next byte

@throws IOException problem reading the byte
Get the next byte