public Optional < SectionHeader > maybeGetSectionHeaderByOffset ( long fileOffset ) { List < SectionHeader > headers = table . getSectionHeaders ( ) ; for ( SectionHeader header : headers ) { PhysicalLocation loc = getPhysicalSectionLocation ( header ) ; if ( addressIsWithin ( loc , fileOffset ) ) { return Optional . of ( header ) ; } } return Optional . absent ( ) ; }
Returns the section entry of the section table the offset is pointing into .