- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Provider values() method in Java
The property values in the Provider can be viewed with an unmodifiable Collection view that is obtained using the method values() in the class java.security.Provider. This method requires no parameters and it returns an unmodifiable Collection view of the property values.
A program that demonstrates this is given as follows −
Example
import java.security.*; import java.util.*; public class Demo { public static void main(String[] argv) throws Exception { try { Signature sign = Signature.getInstance("DSA"); Provider p = sign.getProvider(); Collection<Object> val = p.values(); Iterator i = val.iterator(); System.out.println("The unmodifiable Collection view is:
"); int x = 30; while (x > 0) { System.out.println(i.next()); x--; } } catch (NoSuchAlgorithmException e) { System.out.println("Error!!! NoSuchAlgorithmException"); } } }
Output
The unmodifiable Collection view is: SHA1withDSA SHA1withDSA SHA1withDSA Software sun.security.provider.JavaKeyStore$DualFormatJKS SHA sun.security.provider.SHA sun.security.provider.JavaKeyStore$CaseExactJKS Software sun.security.provider.DSA$SHA256withDSA SHA SHA1withDSA Software Software Software sun.security.provider.DSA$RawDSA X.509 java.security.interfaces.DSAPublicKey|java.security.interfaces.DSAPrivateKey sun.security.provider.certpath.IndexedCollectionCertStore sun.security.provider.Sun SHA SHA1withDSA sun.security.provider.DomainKeyStore$DKS Software SHA256withDSA SHA224withDSA 1024 1024 Software sun.security.provider.DSAKeyFactory
- Related Articles
- Provider elements() method in Java
- Provider entrySet() method in Java
- Provider get() method in Java
- Provider getInfo() method in Java
- Provider getName() method in Java
- Provider getVersion() method in Java
- Provider toString() method in Java
- Provider getProperty() method in Java
- Provider getService() method in Java
- Provider keys() method in Java
- Provider keySet() method in Java
- Can a method return multiple values in Java?
- How can we create a Service Provider interface in Java 9?
- Are values returned by static method are static in java?
- Does Java support default parameter values for a method?

Advertisements