// Path: src/main/java/me/itzg/mccy/types/ZipMiningHandler.java
// public interface ZipMiningHandler {
//     void handleZipContentFile(String path, InputStream in) throws IOException, MccyException;
// 
//     static ListBuilder listBuilder() {
//         return new ListBuilder();
//     }
// 
//     class Entry {
//         private Pattern path;
//         private ZipMiningHandler handler;
// 
//         public Entry(Pattern path, ZipMiningHandler handler) {
//             this.path = path;
//             this.handler = handler;
//         }
// 
//         public Pattern getPath() {
//             return path;
//         }
// 
//         public ZipMiningHandler getHandler() {
//             return handler;
//         }
//     }
// 
//     class ListBuilder {
// 
//         private List<Entry> entries = new ArrayList<>();
// 
//         public ListBuilder add(String pathRegex, ZipMiningHandler handler) {
//             entries.add(new Entry(Pattern.compile(pathRegex), handler));
//             return this;
//         }
// 
//         public Optional<List<Entry>> build() {
//             return Optional.of(entries);
//         }
// 
//     }
// }


import me.itzg.mccy.types.ZipMiningHandler;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import java.util.Optional;
package me.itzg.mccy.services;



/**
 * @author Geoff Bourne
 * @since 0.2
 */
public interface ZipMiningService {
    /**
     * Walks a zip file invoking the given handlers and returns a file hash ID.
     * @param rawInputStream the raw input stream of the zip file
     * @param handlers an optional list of handler to be invoked
     * @return the overall file's hash ID
     * @throws IOException
     */
    String interrogate(InputStream rawInputStream,
// Path: src/main/java/me/itzg/mccy/types/ZipMiningHandler.java
// public interface ZipMiningHandler {
//     void handleZipContentFile(String path, InputStream in) throws IOException, MccyException;
// 
//     static ListBuilder listBuilder() {
//         return new ListBuilder();
//     }
// 
//     class Entry {
//         private Pattern path;
//         private ZipMiningHandler handler;
// 
//         public Entry(Pattern path, ZipMiningHandler handler) {
//             this.path = path;
//             this.handler = handler;
//         }
// 
//         public Pattern getPath() {
//             return path;
//         }
// 
//         public ZipMiningHandler getHandler() {
//             return handler;
//         }
//     }
// 
//     class ListBuilder {
// 
//         private List<Entry> entries = new ArrayList<>();
// 
//         public ListBuilder add(String pathRegex, ZipMiningHandler handler) {
//             entries.add(new Entry(Pattern.compile(pathRegex), handler));
//             return this;
//         }
// 
//         public Optional<List<Entry>> build() {
//             return Optional.of(entries);
//         }
// 
//     }
// }


// Path: src/main/java/me/itzg/mccy/services/ZipMiningService.java
import me.itzg.mccy.types.ZipMiningHandler;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import java.util.Optional;

package me.itzg.mccy.services;



/**
 * @author Geoff Bourne
 * @since 0.2
 */
public interface ZipMiningService {
    /**
     * Walks a zip file invoking the given handlers and returns a file hash ID.
     * @param rawInputStream the raw input stream of the zip file
     * @param handlers an optional list of handler to be invoked
     * @return the overall file's hash ID
     * @throws IOException
     */
    String interrogate(InputStream rawInputStream,
                       Optional<List<ZipMiningHandler.Entry>> handlers) throws IOException;