aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/makamys/neodymium/util/virtualjar/IVirtualJar.java
blob: dbc4ca937d5dddb92c0be8b55303fe2825989ef7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package makamys.neodymium.util.virtualjar;

import java.io.InputStream;

public interface IVirtualJar {

    public String getName();
    
    public default boolean hasFile(String path) {
        try(InputStream is = getInputStream(path)) {
            return is != null;
        } catch(Exception e) {
            return false;
        }
    }
    
    public InputStream getInputStream(String path);
    
}