Skip to content

Commit b9600f6

Browse files
committed
ska vara klart nu har glömt att commit jobbet inser jag dock
1 parent 524f33c commit b9600f6

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package org.example;
2+
3+
import java.util.HashMap;
4+
import java.util.Map;
5+
6+
public class FileCache {
7+
private final Map<String, byte []> cache = new HashMap<>();
8+
9+
public boolean contains (String key) {
10+
return cache.containsKey(key);
11+
}
12+
13+
public byte[] get(String key) {
14+
return cache.get(key);
15+
}
16+
17+
public void put(String key, byte[] value){
18+
cache.put(key, value);
19+
}
20+
public void clear() {
21+
cache.clear();
22+
}
23+
24+
public int size() {
25+
return cache.size();
26+
}
27+
28+
}

0 commit comments

Comments
 (0)