1
2
3
4
5 package de.schlichtherle.truezip.fs;
6
7 import java.io.IOException;
8 import javax.annotation.concurrent.ThreadSafe;
9
10
11
12
13
14
15
16
17
18
19
20
21 @ThreadSafe
22 public final class FsResourceOpenException extends IOException {
23 private static final long serialVersionUID = 1L;
24
25 final int local, total;
26
27 FsResourceOpenException(int total, int local) {
28 super("Thread-local / total number of open I/O resources (streams, channels etc): %d / %d");
29 this.local = local;
30 this.total = total;
31 }
32
33 public int getLocal() { return local; }
34
35 public int getTotal() { return total; }
36
37 @Override
38 public String getMessage() {
39 return String.format(super.getMessage(), local, total);
40 }
41 }