package org.chenyang.http.impl.cookie;

import org.chenyang.http.annotation.Contract;
import org.chenyang.http.annotation.ThreadingBehavior;
import org.chenyang.http.conn.util.PublicSuffixList;
import java.io.IOException;
import java.io.Reader;

/** @deprecated */
@Deprecated
@Contract(
   threading = ThreadingBehavior.IMMUTABLE
)
public class PublicSuffixListParser {
   private final PublicSuffixFilter filter;
   private final org.chenyang.http.conn.util.PublicSuffixListParser parser;

   PublicSuffixListParser(PublicSuffixFilter filter) {
      this.filter = filter;
      this.parser = new org.chenyang.http.conn.util.PublicSuffixListParser();
   }

   public void parse(Reader reader) throws IOException {
      PublicSuffixList suffixList = this.parser.parse(reader);
      this.filter.setPublicSuffixes(suffixList.getRules());
      this.filter.setExceptions(suffixList.getExceptions());
   }
}
