void (final int lineFeeds) { assert lineFeeds < MAX_LF_COUNT; final int flags = myFlags; myFlags &= ~0xFFFFFF80; // keep only seven lower bits, i.e. drop all line feeds registered before if any myFlags |= (lineFeeds << LF_COUNT_SHIFT); assert getLineFeeds() == lineFeeds; assert (flags & 0x7F) == (myFlags & 0x7F); }