Class RACFOutputStream

java.lang.Object
java.io.OutputStream
com.ibm.crypto.hdwrCCA.provider.RACFOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class RACFOutputStream extends OutputStream
The RACFOutputStream extends OutputStream and is for use by the JceRACFKeyStore to write certificates and private keys to RACF.
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    void
    Close the RACFOutputStream.
    void
    Flush the RACFOuputStream.
    void
    write(byte[] b)
    Write data to the RACFOutputStream from a byte array.
    void
    write(byte[] b, int off, int len)
    Write data to the RACFOutputStream from a byte array.
    void
    write(int b)
    Writes b.length bytes from the specified int to this output stream

    Methods inherited from class java.io.OutputStream

    nullOutputStream

    Methods inherited from class java.lang.Object

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

    • RACFOutputStream

      public RACFOutputStream(String userID, String ringid, char[] passwd) throws IOException
      Constructs an instance of a RACFOutputStream. A RACFOutputStream is used to write certificates and keys to 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:
      IOException - writing keys/certificates to the key ring.
  • Method Details

    • write

      public void write(int b) throws IOException
      Writes b.length bytes from the specified int to this output stream
      Specified by:
      write in class OutputStream
      Parameters:
      b - the data
      Throws:
      IOException - if RACFOutputStream is closed
    • write

      public void write(byte[] b) throws IOException
      Write data to the RACFOutputStream from a byte array.
      Overrides:
      write in class OutputStream
      Parameters:
      b - a byte array that will contain the data for the RACFInputStream
      Throws:
      IOException - if RACFOutputStream is closed
    • write

      public void write(byte[] b, int off, int len) throws IOException
      Write data to the RACFOutputStream from a byte array.
      Overrides:
      write in class OutputStream
      Parameters:
      b - a byte array that will contain the data for the RACFInputStream
      off -
      len -
      Throws:
      IOException - if RACFOutputStream is closed
    • close

      public void close() throws IOException
      Close the RACFOutputStream.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class OutputStream
      Throws:
      IOException
    • flush

      public void flush() throws IOException
      Flush the RACFOuputStream. Parse the accumulated entries added from the RACF KeyStore into Entry objects. Then, write the entry object data into a buffer for the JNI code to parse.
      Specified by:
      flush in interface Flushable
      Overrides:
      flush in class OutputStream
      Throws:
      IOException