docs: private long recover() throws IOException {
          checkMutable();
          long len = channel.size();
          ByteBuffer buffer = ByteBuffer.allocate(4);
          long validUpTo = 0;
          long next = 0L;
          do {
              next = validateMessage(channel, validUpTo, len, buffer);
              if (next >= 0) validUpTo = next;
          } while (next >= 0);
          channel.truncate(validUpTo);
          setSize.set(validUpTo);
          setHighWaterMark.set(validUpTo);
          logger.info("recover high water mark:" + highWaterMark());
          /* This should not be necessary, but fixes bug 6191269 on some OSs. */
          channel.position(validUpTo);
          needRecover.set(false);
          return len - validUpTo;
      }