01: /*
02: *
03: *
04: * Copyright 1990-2007 Sun Microsystems, Inc. All Rights Reserved.
05: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
06: *
07: * This program is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU General Public License version
09: * 2 only, as published by the Free Software Foundation.
10: *
11: * This program is distributed in the hope that it will be useful, but
12: * WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * General Public License version 2 for more details (a copy is
15: * included at /legal/license.txt).
16: *
17: * You should have received a copy of the GNU General Public License
18: * version 2 along with this work; if not, write to the Free Software
19: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20: * 02110-1301 USA
21: *
22: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
23: * Clara, CA 95054 or visit www.sun.com if you need additional
24: * information or have any questions.
25: */
26:
27: package com.sun.midp.main;
28:
29: import com.sun.midp.midletsuite.MIDletSuiteStorage;
30:
31: import java.io.IOException;
32:
33: /**
34: * This a class stub class to enable the com.sun.midp.installer.Installer
35: * to compile.
36: */
37: public class MIDletSuiteVerifier {
38: /**
39: * Schedule suite classes verification to be done by a new VM started
40: * as soon as the current VM will be terminated.
41: *
42: * @param suiteId id of the suite whose classes are to be verified
43: * @param suiteStorage suite storage instance
44: * @return null verify hash value, since no verification is done,
45: * the verification is only scheduled to be done in the future
46: * @throws IOException
47: */
48: public static byte[] verifySuiteClasses(int suiteId,
49: MIDletSuiteStorage suiteStorage) throws IOException {
50: throw new IOException("stub version");
51: }
52:
53: /**
54: * Evaluate hash value for the JAR package
55: *
56: * @param jarPath JAR package path
57: * @return hash value for JAR package
58: */
59: public static byte[] getJarHash(String jarPath) throws IOException {
60: throw new IOException("stub version");
61: }
62:
63: /**
64: * Compare hash value of the JAR with provided hash value.
65: *
66: * @param jarPath path to JAR file
67: * @param hashValue hash value to compare with
68: * @return true if JAR has hash value equal to the provided one,
69: * otherwise false
70: * @throws IOException
71: */
72: public static boolean checkJarHash(String jarPath, byte[] hashValue)
73: throws IOException {
74: throw new IOException("stub version");
75: }
76: }
|