Class EncryptedTempData


  • @Beta
    public class EncryptedTempData
    extends java.lang.Object
    EncryptedTempData can be used to buffer binary data in a secure way, by using encrypted temp files.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dispose()
      Removes the temporarily backing file
      java.io.InputStream getInputStream()
      Returns the input stream for reading the previously written encrypted data
      java.io.OutputStream getOutputStream()
      Returns the output stream for writing the data.
      • Methods inherited from class java.lang.Object

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

      • EncryptedTempData

        public EncryptedTempData()
                          throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • getOutputStream

        public java.io.OutputStream getOutputStream()
                                             throws java.io.IOException
        Returns the output stream for writing the data.

        Make sure to close it, otherwise the last cipher block is not written completely.

        Returns:
        the outputstream
        Throws:
        java.io.IOException - if the writing to the underlying file fails
      • getInputStream

        public java.io.InputStream getInputStream()
                                           throws java.io.IOException
        Returns the input stream for reading the previously written encrypted data
        Returns:
        the inputstream
        Throws:
        java.io.IOException - if the reading of the underlying file fails
      • dispose

        public void dispose()
        Removes the temporarily backing file