Open a literal data packet, returning a stream to store the data inside the packet, as an indefinite 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 created can be closed off by either calling Close() on the stream or Close() on the generator. Closing the returned stream does not close off the Stream parameter outStr.

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.

Namespace: Org.BouncyCastle.Bcpg.OpenPgp
Assembly: ITextSharp (in ITextSharp.dll) Version: 4.1.6.0

Syntax

C#
public Stream Open(
	Stream outStr,
	char format,
	string name,
	DateTime modificationTime,
	byte[] buffer
)
Visual Basic
Public Function Open ( _
	outStr As Stream, _
	format As Char, _
	name As String, _
	modificationTime As DateTime, _
	buffer As Byte() _
) As Stream
Visual C++
public:
Stream^ Open(
	Stream^ outStr, 
	wchar_t format, 
	String^ name, 
	DateTime modificationTime, 
	array<unsigned char>^ buffer
)

Parameters

outStr
Type: System.IO..::..Stream
The stream we want the packet in.
format
Type: System..::..Char
The format we are using.
name
Type: System..::..String
The name of the 'file'.
modificationTime
Type: System..::..DateTime
The time of last modification we want stored.
buffer
Type: array<System..::..Byte>[]()[][]
The buffer to use for collecting data to put into chunks.

See Also