| java.lang.Object org.bouncycastle.openpgp.PGPLiteralDataGenerator
PGPLiteralDataGenerator | public class PGPLiteralDataGenerator implements StreamGenerator(Code) | | Class for producing literal data packets.
|
Field Summary | |
final public static char | BINARY | final public static String | CONSOLE The special name indicating a "for your eyes only" packet. | final public static Date | NOW The special time for a modification time of "now" or
the present time. | final public static char | TEXT |
Method Summary | |
public void | close() Close the literal data packet - this is equivalent to calling close on the stream
returned by the open() method. | public OutputStream | open(OutputStream out, char format, String name, long length, Date modificationTime) Open a literal data packet, returning a stream to store the data inside
the packet. | public OutputStream | open(OutputStream out, char format, String name, Date modificationTime, byte[] buffer) Open a literal data packet, returning a stream to store the data inside
the packet as an indefiinite length stream. | public OutputStream | open(OutputStream out, char format, File file) Open a literal data packet for the passed in File object, returning
an output stream for saving the file contents. |
BINARY | final public static char BINARY(Code) | | |
CONSOLE | final public static String CONSOLE(Code) | | The special name indicating a "for your eyes only" packet.
|
NOW | final public static Date NOW(Code) | | The special time for a modification time of "now" or
the present time.
|
TEXT | final public static char TEXT(Code) | | |
PGPLiteralDataGenerator | public PGPLiteralDataGenerator()(Code) | | |
PGPLiteralDataGenerator | public PGPLiteralDataGenerator(boolean oldFormat)(Code) | | Generates literal data objects in the old format, this is
important if you need compatability with PGP 2.6.x.
Parameters: oldFormat - |
close | public void close() throws IOException(Code) | | Close the literal data packet - this is equivalent to calling close on the stream
returned by the open() method.
throws: IOException - |
open | public OutputStream open(OutputStream out, char format, String name, long length, Date modificationTime) throws IOException(Code) | | Open a literal data packet, returning a stream to store the data inside
the packet. The stream can be closed off by either calling close()
on the stream or close() on the generator.
Parameters: out - the stream we want the packet in Parameters: format - the format we are using Parameters: name - the name of the "file" Parameters: length - the length of the data we will write Parameters: modificationTime - the time of last modification we want stored. |
open | public OutputStream open(OutputStream out, char format, String name, Date modificationTime, byte[] buffer) throws IOException(Code) | | Open a literal data packet, returning a stream to store the data inside
the packet as an indefiinite length stream. The stream is written out as a
series of partial packets with a chunk size determined by the size of the
passed in buffer.The stream can be closed off by either calling close()
on the stream or close() on the generator.
Note: if the buffer is not a power of 2 in length only the largest power of 2
bytes worth of the buffer will be used.
Parameters: out - the stream we want the packet in Parameters: format - the format we are using Parameters: name - the name of the "file" Parameters: modificationTime - the time of last modification we want stored. Parameters: buffer - the buffer to use for collecting data to put into chunks. |
open | public OutputStream open(OutputStream out, char format, File file) throws IOException(Code) | | Open a literal data packet for the passed in File object, returning
an output stream for saving the file contents. The stream can be closed off by either calling close()
on the stream or close() on the generator.
Parameters: out - Parameters: format - Parameters: file - OutputStream throws: IOException - |
|
|