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.String
SIGNATURE
-
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 void
close()
java.lang.String
getAlgorithm()
java.io.OutputStream
getOutputStream()
void
newLine()
void
setAlgorithm(java.lang.String cipherAlgorithm)
void
setKey(SecurityCrypto key)
void
useKey(java.lang.String keyPath)
void
write(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:
write
in classjava.io.Writer
- Throws:
java.io.IOException
-
newLine
public void newLine() throws java.io.IOException
- Overrides:
newLine
in classjava.io.BufferedWriter
- Throws:
java.io.IOException
-
getOutputStream
public java.io.OutputStream getOutputStream()
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.BufferedWriter
- Throws:
java.io.IOException
-
-