visad/src/main/java/ucar/nc2/iosp/gempak/GempakFileReader.java
protected static String getBits(int b) {
    Formatter s = new Formatter();
    for (int i = 31; i >= 0; i--) {
      if ((b & (1 << i)) != 0) {
        s.format("1");
      } else {
        s.format("0");
      }
      if (i % 8 == 0) {
        s.format("|");
      }
    }
    return s.toString();
  }
protected static String getBits(int b) {
    Formatter s = new Formatter();
    for (int i = 31; i >= 0; i--) {
      if ((b & (1 << i)) != 0) {
        s.format("1");
      } else {
        s.format("0");
      }
      if (i % 8 == 0) {
        s.format("|");
      }
    }
    return s.toString();
  }
protected static String getBits ( int b ) { Formatter s = new Formatter ( ) ; for ( int i = 31 ; i >= 0 ; i -- ) { if ( ( b & ( 1 << i ) ) != 0 ) { s . format ( "1" ) ; } else { s . format ( "0" ) ; } if ( i % 8 == 0 ) { s . format ( "|" ) ; } } return s . toString ( ) ; }
Get a bit string for an integer

@param b the integer
@return a bit string (e.g.: 01100001|11000000|10011010|10110100|)
Get a bit string for an integer