C# Class Org.BouncyCastle.Bcpg.BcpgOutputStream

Basic output stream.
Inheritance: Org.BouncyCastle.Utilities.IO.BaseOutputStream, IBcpgOutputStream
显示文件 Open project: nonorganic/dssnet Class Usage Examples

Public Methods

Method Description
BcpgOutputStream ( Stream outStr ) : System

Create a stream representing a general packet.

BcpgOutputStream ( Stream outStr, PacketTag tag ) : System

Create a stream representing an old style partial object.

BcpgOutputStream ( Stream outStr, PacketTag tag, byte buffer ) : System

Create a new style partial input stream buffered into chunks.

BcpgOutputStream ( Stream outStr, PacketTag tag, long length ) : System

Create a new style partial input stream buffered into chunks.

BcpgOutputStream ( Stream outStr, PacketTag tag, long length, bool oldFormat ) : System

Create a stream representing a general packet.

Close ( ) : void
Finish ( ) : void

Finish writing out the current packet without closing the underlying stream.

Flush ( ) : void

Flush the underlying stream.

Write ( byte buffer, int offset, int count ) : void
WriteByte ( byte value ) : void
WriteObject ( BcpgObject bcpgObject ) : void
WriteObjects ( ) : void
WritePacket ( ContainedPacket p ) : void

Private Methods

Method Description
PartialFlush ( bool isLast ) : void
Wrap ( Stream outStr ) : BcpgOutputStream
WriteHeader ( PacketTag tag, bool oldPackets, bool partial, long bodyLen ) : void
WriteInt ( int n ) : void
WriteLong ( long n ) : void
WriteNewPacketLength ( long bodyLen ) : void
WritePacket ( PacketTag tag, byte body, bool oldFormat ) : void
WritePartial ( byte b ) : void
WritePartial ( byte buffer, int off, int len ) : void
WriteShort ( short n ) : void

Method Details

BcpgOutputStream() public method

Create a stream representing a general packet.
public BcpgOutputStream ( Stream outStr ) : System
outStr Stream Output stream to write to.
return System

BcpgOutputStream() public method

Create a stream representing an old style partial object.
public BcpgOutputStream ( Stream outStr, PacketTag tag ) : System
outStr Stream Output stream to write to.
tag PacketTag The packet tag for the object.
return System

BcpgOutputStream() public method

Create a new style partial input stream buffered into chunks.
public BcpgOutputStream ( Stream outStr, PacketTag tag, byte buffer ) : System
outStr Stream Output stream to write to.
tag PacketTag Packet tag.
buffer byte Buffer to use for collecting chunks.
return System

BcpgOutputStream() public method

Create a new style partial input stream buffered into chunks.
public BcpgOutputStream ( Stream outStr, PacketTag tag, long length ) : System
outStr Stream Output stream to write to.
tag PacketTag Packet tag.
length long Size of chunks making up the packet.
return System

BcpgOutputStream() public method

Create a stream representing a general packet.
public BcpgOutputStream ( Stream outStr, PacketTag tag, long length, bool oldFormat ) : System
outStr Stream Output stream to write to.
tag PacketTag Packet tag.
length long Size of chunks making up the packet.
oldFormat bool If true, the header is written out in old format.
return System

Close() public method

public Close ( ) : void
return void

Finish() public method

Finish writing out the current packet without closing the underlying stream.
public Finish ( ) : void
return void

Flush() public method

Flush the underlying stream.
public Flush ( ) : void
return void

Write() public method

public Write ( byte buffer, int offset, int count ) : void
buffer byte
offset int
count int
return void

WriteByte() public method

public WriteByte ( byte value ) : void
value byte
return void

WriteObject() public method

public WriteObject ( BcpgObject bcpgObject ) : void
bcpgObject BcpgObject
return void

WriteObjects() public method

public WriteObjects ( ) : void
return void

WritePacket() public method

public WritePacket ( ContainedPacket p ) : void
p ContainedPacket
return void