class BitKeeperTagParser implements Executor.StreamHandler {

    private static final Logger LOGGER = LoggerFactory.getLogger(BitKeeperTagParser.class);

    /**
     * Parses dates.
     */
    private final SimpleDateFormat dateFormat;

    /**
     * Store tag entries created by {@link #processStream(InputStream)}.
     */
    private final NavigableSet<TagEntry> entries = new TreeSet<>();

    /**
     * Constructor to construct the thing to be constructed.
     *
     * @param datePattern a simple date format string
     */
    public BitKeeperTagParser(String datePattern) {
        dateFormat = new SimpleDateFormat(datePattern);
    }

    /**
     * Returns the set of entries that has been created.
     *
     * @return entries a set of tag entries
     */
    public NavigableSet<TagEntry> getEntries() {
        return entries;
    }

    /**
     * Process the output of the {@code bk tags} command.
     *
     * Each input line should be in the following format:
     * either
     *   {@code D REVISION\tDATE}
     * or
     *   {@code T TAG}
     *
     * @param input the executor input stream
     * @throws IOException if the stream reader throws an IOException
     */
    @Override
    public void processStream(InputStream input) throws IOException {<FILL_FUNCTION_BODY>}
}

        String revision = null;
        Date date = null;
        String tag;

        final BufferedReader in = new BufferedReader(new InputStreamReader(input));
        for (String line = in.readLine(); line != null; line = in.readLine()) {
            if (line.startsWith("D ")) {
                final String[] fields = line.substring(2).split("\t");
                try {
                    revision = fields[0];
                    date = dateFormat.parse(fields[1]);
                } catch (final Exception e) {
                    LOGGER.log(Level.SEVERE, "Error: malformed BitKeeper tags output {0}", line);
                }
            } else if (line.startsWith("T ") && (date != null)) {
                tag = line.substring(2);
                entries.add(new BitKeeperTagEntry(revision, date, tag));
            }
        }
    
<no_super_class>