152 * construction time. </p>
153 *
154 * @return A {@code ModuleReader} to read the module
155 *
156 * @throws IOException
157 * If an I/O error occurs
158 * @throws SecurityException
159 * If denied by the security manager
160 */
161 public ModuleReader open() throws IOException {
162 try {
163 return readerSupplier.get();
164 } catch (UncheckedIOException e) {
165 throw e.getCause();
166 }
167
168 }
169
170
171 /**
172 * Returns {@code true} if this module has been patched via -Xpatch.
173 */
174 boolean isPatched() {
175 return patched;
176 }
177
178 /**
179 * Returns the hash supplier for this module.
180 */
181 HashSupplier hasher() {
182 return hasher;
183 }
184
185 /**
186 * Computes the hash of this module, returning it as a hex string.
187 * Returns {@code null} if the hash cannot be computed.
188 *
189 * @throws java.io.UncheckedIOException if an I/O error occurs
190 */
191 String computeHash(String algorithm) {
192 String result = cachedHash;
|
152 * construction time. </p>
153 *
154 * @return A {@code ModuleReader} to read the module
155 *
156 * @throws IOException
157 * If an I/O error occurs
158 * @throws SecurityException
159 * If denied by the security manager
160 */
161 public ModuleReader open() throws IOException {
162 try {
163 return readerSupplier.get();
164 } catch (UncheckedIOException e) {
165 throw e.getCause();
166 }
167
168 }
169
170
171 /**
172 * Returns {@code true} if this module has been patched via --patch-module.
173 */
174 boolean isPatched() {
175 return patched;
176 }
177
178 /**
179 * Returns the hash supplier for this module.
180 */
181 HashSupplier hasher() {
182 return hasher;
183 }
184
185 /**
186 * Computes the hash of this module, returning it as a hex string.
187 * Returns {@code null} if the hash cannot be computed.
188 *
189 * @throws java.io.UncheckedIOException if an I/O error occurs
190 */
191 String computeHash(String algorithm) {
192 String result = cachedHash;
|