com.ibm.crypto.hdwrCCA.provider

Class RACFInputStream

  • java.lang.Object
    • java.io.InputStream
      • com.ibm.crypto.hdwrCCA.provider.RACFInputStream
  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable


    public class RACFInputStream
    extends java.io.InputStream
    The RACFInputStream extends InputStream and is for use by the JceRACFKeyStore to read certificates and private keys from RACF.
    • Constructor Summary

      Constructors 
      Constructor and Description
      RACFInputStream(java.lang.String userID, java.lang.String ringid, char[] passwd)
      Constructs an instance of a RACFInputStream.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int available()
      Return the number of bytes of data still in the RACFInputStream.
      void close()
      Close the InputStream.
      java.lang.Object getEntry(java.util.Hashtable racfs, java.lang.String key, char[] passwd)
      Retrieve a RACF key with the specified alias.
      void mark(int readlimit) 
      boolean markSupported()
      Return whether the InputStream supports the mark method.
      int read()
      Read a single byte from the RACFInputStream.
      int read(byte[] buffer)
      Read data from the RACFInputStream and store it into a byte array.
      int read(byte[] buffer, int offset, int count)
      Read data from the RACFInputStream and store it into a byte array.
      void reset() 
      • Methods inherited from class java.io.InputStream

        skip
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RACFInputStream

        public RACFInputStream(java.lang.String userID,
                               java.lang.String ringid,
                               char[] passwd)
                        throws java.io.IOException
        Constructs an instance of a RACFInputStream. A RACFInputStream is used to access certificates and keys from a RACF Key Ring.
        Parameters:
        userID - a string containing the ID of the user that owns the keyring
        ringid - a string containing the name of the RACF key ring
        passwd - a character array containing the password for the keystore
        Throws:
        java.io.IOException - retrieving keys/certificates from the key ring.
    • Method Detail

      • read

        public int read(byte[] buffer)
                 throws java.io.IOException
        Read data from the RACFInputStream and store it into a byte array.
        Overrides:
        read in class java.io.InputStream
        Parameters:
        buffer - a byte array that will contain the data from the RACFInputStream
        Throws:
        java.io.IOException - reading past the end of the InputStream.
      • read

        public int read(byte[] buffer,
                        int offset,
                        int count)
                 throws java.io.IOException
        Read data from the RACFInputStream and store it into a byte array.
        Overrides:
        read in class java.io.InputStream
        Parameters:
        buffer - a byte array that will contain the data from the RACFInputStream.
        offset - an integer containing the offset into buffer to start writing data to.
        count - an integer containing the number of bytes to read from the InputStream.
        Throws:
        java.io.IOException - reading past the end of the InputStream.
      • read

        public int read()
                 throws java.io.IOException
        Read a single byte from the RACFInputStream.
        Specified by:
        read in class java.io.InputStream
        Throws:
        java.io.IOException - reading past the end of the InputStream.
      • available

        public int available()
        Return the number of bytes of data still in the RACFInputStream.
        Overrides:
        available in class java.io.InputStream
      • markSupported

        public boolean markSupported()
        Return whether the InputStream supports the mark method.
        Overrides:
        markSupported in class java.io.InputStream
      • close

        public void close()
                   throws java.io.IOException
        Close the InputStream.
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface java.lang.AutoCloseable
        Overrides:
        close in class java.io.InputStream
        Throws:
        java.io.IOException
      • mark

        public void mark(int readlimit)
        Overrides:
        mark in class java.io.InputStream
      • reset

        public void reset()
                   throws java.io.IOException
        Overrides:
        reset in class java.io.InputStream
        Throws:
        java.io.IOException
      • getEntry

        public java.lang.Object getEntry(java.util.Hashtable racfs,
                                         java.lang.String key,
                                         char[] passwd)
                                  throws java.io.IOException
        Retrieve a RACF key with the specified alias.
        Parameters:
        racfs - hash table containing RACF keys
        key - alias of the RACF key to get
        passwd - password protecting the RACF key
        Returns:
        the constructed HWKeyEntryRACF object
        Throws:
        java.io.IOException - if an error is detected
� Portions Copyright 1997, 2022 IBM Corporation. All rights reserved. � Portions Copyright 1997, 2022, Oracle and/or its affiliates. All rights reserved.