(
final MIDlet app,
final DataInputStream in)
| 17 | */ |
| 18 | public 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, |
no test coverage detected