Package com.ibm.di.security
Class EncryptedWriter
- java.lang.Object
-
- java.io.Writer
-
- java.io.BufferedWriter
-
- com.ibm.di.security.EncryptedWriter
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.Appendable,java.lang.AutoCloseable
public class EncryptedWriter extends java.io.BufferedWriter
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSIGNATURE
-
Constructor Summary
Constructors Constructor Description EncryptedWriter(java.io.OutputStream stream)EncryptedWriter(java.io.Writer stream)EncryptedWriter(java.io.Writer writer, java.io.OutputStream stream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()java.lang.StringgetAlgorithm()java.io.OutputStreamgetOutputStream()voidnewLine()voidsetAlgorithm(java.lang.String cipherAlgorithm)voidsetKey(SecurityCrypto key)voiduseKey(java.lang.String keyPath)voidwrite(java.lang.String str)
-
-
-
Field Detail
-
SIGNATURE
public static final java.lang.String SIGNATURE
- See Also:
- Constant Field Values
-
-
Method Detail
-
useKey
public void useKey(java.lang.String keyPath) throws java.lang.Exception- Throws:
java.lang.Exception
-
setKey
public void setKey(SecurityCrypto key)
-
setAlgorithm
public void setAlgorithm(java.lang.String cipherAlgorithm)
-
getAlgorithm
public java.lang.String getAlgorithm()
-
write
public void write(java.lang.String str) throws java.io.IOException- Overrides:
writein classjava.io.Writer- Throws:
java.io.IOException
-
newLine
public void newLine() throws java.io.IOException- Overrides:
newLinein classjava.io.BufferedWriter- Throws:
java.io.IOException
-
getOutputStream
public java.io.OutputStream getOutputStream()
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.BufferedWriter- Throws:
java.io.IOException
-
-