MCPcopy Create free account
hub / github.com/dumbledore/AlbiteREADER / checkValidity

Method checkValidity

src/org/albite/util/RMSHelper.java:19–38  ·  view source on GitHub ↗
(
            final MIDlet app,
            final DataInputStream in)

Source from the content-addressed store, hash-verified

17 */
18public class RMSHelper {
19 public static void checkValidity(
20 final MIDlet app,
21 final DataInputStream in) throws IOException, RecordStoreException {
22
23 final String version = app.getAppProperty("MIDlet-Version");
24
25 if (version == null) {
26 throw new RecordStoreException();
27 }
28
29 final String rmsVersion = in.readUTF();
30
31 if (rmsVersion == null) {
32 throw new RecordStoreException();
33 }
34
35 if (!rmsVersion.equals(version)) {
36 throw new RecordStoreException();
37 }
38 }
39
40 public static void writeVersionNumber(
41 final MIDlet app,

Callers 2

openRMSAndLoadDataMethod · 0.95
openRMSAndLoadDataMethod · 0.95

Calls 2

readUTFMethod · 0.80
equalsMethod · 0.45

Tested by

no test coverage detected