private boolean readMetaSegment ( ReadStream is , int crc ) throws IOException { long value = BitsUtil . readLong ( is ) ; crc = Crc32Caucho . generate ( crc , value ) ; int crcFile = BitsUtil . readInt ( is ) ; if ( crcFile != crc ) { log . fine ( "meta-segment crc mismatch" ) ; return false ; } long address = value & ~ 0xffff ; int length = ( int ) ( ( value & 0xffff ) << 16 ) ; SegmentExtent segment = new SegmentExtent ( _segmentId ++ , address , length ) ; SegmentMeta segmentMeta = findSegmentMeta ( length ) ; segmentMeta . addSegment ( segment ) ; return true ; }
metadata for a segment