@Nullable
  public byte[] getBitmap(RandomAccessFile raf) throws IOException {
    // no bitMap
    if (bitMapIndicator == 255)
      return null;

    // LOOK: bitMapIndicator=254 == previously defined bitmap
    if (bitMapIndicator == 254)
      logger.debug("HEY bitMapIndicator=254 previously defined bitmap");

    if (bitMapIndicator != 0) {
      throw new UnsupportedOperationException("Grib2 Bit map section pre-defined (provided by center) = " + bitMapIndicator);
    }

    raf.seek(startingPosition);
    int length = GribNumbers.int4(raf);
    raf.skipBytes(2);

    byte[] data = new byte[length - 6];
    raf.readFully(data);

    return data;
  }
@Nullable
  public byte[] getBitmap(RandomAccessFile raf) throws IOException {
    
    if (bitMapIndicator == 255)
      return null;

    
    if (bitMapIndicator == 254)
      logger.debug("HEY bitMapIndicator=254 previously defined bitmap");

    if (bitMapIndicator != 0) {
      throw new UnsupportedOperationException("Grib2 Bit map section pre-defined (provided by center) = " + bitMapIndicator);
    }

    raf.seek(startingPosition);
    int length = GribNumbers.int4(raf);
    raf.skipBytes(2);

    byte[] data = new byte[length - 6];
    raf.readFully(data);

    return data;
  }
@ Nullable public byte [ ] getBitmap ( RandomAccessFile raf ) throws IOException { // no bitMap
 if ( bitMapIndicator == 255 ) return null ; // LOOK: bitMapIndicator=254 == previously defined bitmap
 if ( bitMapIndicator == 254 ) logger . debug ( "HEY bitMapIndicator=254 previously defined bitmap" ) ; if ( bitMapIndicator != 0 ) { throw new UnsupportedOperationException ( "Grib2 Bit map section pre-defined (provided by center) = " + bitMapIndicator ) ; } raf . seek ( startingPosition ) ; int length = GribNumbers . int4 ( raf ) ; raf . skipBytes ( 2 ) ; byte [ ] data = new byte [ length - 6 ] ; raf . readFully ( data ) ; return data ; }
Read the bit map array.

@param raf read from here
@return bit map as array of byte values, or null if none.
@throws java.io.IOException on read error
Read the bit map array .