C# Class CK.Monitoring.LogReaderStreamInfo

Container for an uncompressed log stream and other meta-information.
Datei anzeigen Open project: Invenietis/ck-core Class Usage Examples

Public Properties

Property Type Description
HeaderLength int
IsCompressed bool
LogStream Stream
Version int

Public Methods

Method Description
OpenStream ( Stream seekableStream ) : LogReaderStreamInfo

Opens a log stream, handling version and compression. On success, its Stream positionned after the header (before the first log entry). Supports headers: - Old version header (05 00 00 00) - CKMOD header (43 4B 4D 4F 4E) followed by version - RFC 1952 GZIP header (1F 8B), will be handled automatically by: a GZip stream reader will be created.

Private Methods

Method Description
DoOpenLogStream ( Stream s, bool isInsideGzip ) : LogReaderStreamInfo
LogReaderStreamInfo ( Stream s, bool c, int v, int hLen ) : System

Method Details

OpenStream() public static method

Opens a log stream, handling version and compression. On success, its Stream positionned after the header (before the first log entry). Supports headers: - Old version header (05 00 00 00) - CKMOD header (43 4B 4D 4F 4E) followed by version - RFC 1952 GZIP header (1F 8B), will be handled automatically by: a GZip stream reader will be created.
public static OpenStream ( Stream seekableStream ) : LogReaderStreamInfo
seekableStream Stream Log stream to read.
return LogReaderStreamInfo

Property Details

HeaderLength public_oe property

The length of the version header.
public int HeaderLength
return int

IsCompressed public_oe property

Gets a value indicating whether the log stream is contained in a compressed stream. true if the log stream is contained in a compressed stream; otherwise, false.
public bool IsCompressed
return bool

LogStream public_oe property

Gets the log stream: it is opened and uncompressed. Its position is before the version number if Version is equal to -1; otherwise, it is after.
public Stream LogStream
return Stream

Version public_oe property

The version.
public int Version
return int