blob: 3df9c2bb13104f235292337f7e7296e3af5c3c5f (
plain)
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
|
package dslog;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.lang.UnsupportedOperationException;
class PdplogReader implements Closeable {
private final InputStream reader;
public final int version;
public PdplogReader(InputStream reader) throws IOException {
this.reader = reader;
this.version = Read.i32(reader);
switch (this.version) {
case 0: // ????-????
throw new UnsupportedOperationException("TODO: PDPLOG v0 support");
case 1: // ????-2015
throw new UnsupportedOperationException("TODO: PDPLOG v1 support");
default:
throw new UnsupportedOperationException("Unrecognized PDPLOG version: "+this.version);
}
}
public void close() throws IOException {
reader.close();
}
}
|