@ 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 .