Class WriteToFileMultiPassStrategy
- java.lang.Object
-
- org.pgpainless.signature.cleartext_signatures.WriteToFileMultiPassStrategy
-
- All Implemented Interfaces:
MultiPassStrategy
public class WriteToFileMultiPassStrategy extends java.lang.Object implements MultiPassStrategy
File-based multi-pass strategy. When processing the signed data the first time, the data is being written out into a file. For the second pass, that file is being read again.
-
-
Constructor Summary
Constructors Constructor Description WriteToFileMultiPassStrategy(java.io.File file)Create aMultiPassStrategywhich writes data to a file.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.InputStreamgetMessageInputStream()Provide anInputStreamwhich contains the data that was previously written away inMultiPassStrategy.getMessageOutputStream().java.io.OutputStreamgetMessageOutputStream()Provide anOutputStreaminto which the signed data can be read into.
-
-
-
Constructor Detail
-
WriteToFileMultiPassStrategy
public WriteToFileMultiPassStrategy(java.io.File file)
Create aMultiPassStrategywhich writes data to a file. Note thatgetMessageOutputStream()will create the file if necessary.- Parameters:
file- file to write the data to and read from
-
-
Method Detail
-
getMessageOutputStream
public java.io.OutputStream getMessageOutputStream() throws java.io.IOExceptionDescription copied from interface:MultiPassStrategyProvide anOutputStreaminto which the signed data can be read into.- Specified by:
getMessageOutputStreamin interfaceMultiPassStrategy- Returns:
- output stream
- Throws:
java.io.IOException- io error
-
getMessageInputStream
public java.io.InputStream getMessageInputStream() throws java.io.IOExceptionDescription copied from interface:MultiPassStrategyProvide anInputStreamwhich contains the data that was previously written away inMultiPassStrategy.getMessageOutputStream().- Specified by:
getMessageInputStreamin interfaceMultiPassStrategy- Returns:
- input stream
- Throws:
java.io.IOException- io error
-
-