jdk/src/java.base/share/classes/java/security/KeyStoreSpi.java
changeset 28243 47080f9ae750
parent 25859 3317bb8137f4
child 29492 a4bf9a570035
--- a/jdk/src/java.base/share/classes/java/security/KeyStoreSpi.java	Tue Dec 23 15:10:15 2014 +0000
+++ b/jdk/src/java.base/share/classes/java/security/KeyStoreSpi.java	Tue Dec 23 16:30:57 2014 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -590,4 +590,27 @@
         }
         return false;
     }
+
+    /**
+     * Probes the specified input stream to determine whether it contains a
+     * keystore that is supported by this implementation, or not.
+     *
+     * <p>
+     * @implSpec
+     * This method returns false by default. Keystore implementations should
+     * override this method to peek at the data stream directly or to use other
+     * content detection mechanisms.
+     *
+     * @param  stream the keystore data to be probed
+     *
+     * @return true if the keystore data is supported, otherwise false
+     *
+     * @throws IOException if there is an I/O problem with the keystore data.
+     * @throws NullPointerException if stream is {@code null}.
+     *
+     * @since 1.9
+     */
+    public boolean engineProbe(InputStream stream) throws IOException {
+        return false;
+    }
 }