rk
昨天 4a8ff39b0fab0627ef8f7459587d514cc01c3676
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package com.doumee.lib_coremodel.util;
 
import android.os.Environment;
 
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Collection;
import java.util.Enumeration;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
 
public class BuildProperties {
    private final Properties properties;
 
    private BuildProperties() throws IOException {
        properties = new Properties();
        properties.load(new FileInputStream(new File(Environment.getRootDirectory(), "build.prop")));
    }
 
    public boolean containsKey(final Object key) {
        return properties.containsKey(key);
    }
 
    public boolean containsValue(final Object value) {
        return properties.containsValue(value);
    }
 
    public Set<Map.Entry<Object, Object>> entrySet() {
        return properties.entrySet();
    }
 
    public String getProperty(final String name) {
        return properties.getProperty(name);
    }
 
    public String getProperty(final String name, final String defaultValue) {
        return properties.getProperty(name, defaultValue);
    }
 
    public boolean isEmpty() {
        return properties.isEmpty();
    }
 
    public Enumeration<Object> keys() {
        return properties.keys();
    }
 
    public Set<Object> keySet() {
        return properties.keySet();
    }
 
    public int size() {
        return properties.size();
    }
 
    public Collection<Object> values() {
        return properties.values();
    }
 
    public static BuildProperties newInstance() throws IOException {
        return new BuildProperties();
    }
}