C# Class KFS.DataStream.Util

Utility functions for reading data streams.
Datei anzeigen Open project: Alex-Jaeger/BitcoinFindAndRecover

Public Methods

Method Description
CreateTemporaryDirectory ( ) : string
CreateTemporaryFile ( IDataStream stream ) : string
DetectFSType ( IDataStream stream ) : string
FileSizeToHumanReadableString ( ulong count ) : string
GetASCIIString ( IDataStream stream, ulong offset, ulong count ) : string
GetArbitraryInt ( byte data, int offset, int intSize ) : long
GetArbitraryUInt ( IDataStream stream, ulong offset, int intSize ) : ulong
GetArbitraryUInt ( byte data, int offset, int intSize ) : ulong
GetByte ( IDataStream stream, ulong offset ) : byte
GetBytes ( IDataStream stream ) : byte[]
GetDiskSize ( SafeFileHandle handle ) : ulong
GetHexString ( IDataStream stream, ulong offset, ulong count ) : string
GetInt16 ( IDataStream stream, ulong offset ) : short
GetInt24 ( IDataStream stream, ulong offset ) : int
GetInt32 ( IDataStream stream, ulong offset ) : int
GetInt64 ( IDataStream stream, ulong offset ) : long
GetRandomString ( int length ) : string
GetUInt16 ( IDataStream stream, ulong offset ) : ushort
GetUInt24 ( IDataStream stream, ulong offset ) : uint
GetUInt32 ( IDataStream stream, ulong offset ) : uint
GetUInt64 ( IDataStream stream, ulong offset ) : ulong
GetUnicodeString ( IDataStream stream, ulong offset, ulong count ) : string
Sanitise ( string message ) : string

Removes any special characters from the string.

SpacifyEnum ( string s ) : string
StrLen ( IDataStream stream, ulong offset, ulong max ) : ulong

Method Details

CreateTemporaryDirectory() public static method

public static CreateTemporaryDirectory ( ) : string
return string

CreateTemporaryFile() public static method

public static CreateTemporaryFile ( IDataStream stream ) : string
stream IDataStream
return string

DetectFSType() public static method

public static DetectFSType ( IDataStream stream ) : string
stream IDataStream
return string

FileSizeToHumanReadableString() public static method

public static FileSizeToHumanReadableString ( ulong count ) : string
count ulong
return string

GetASCIIString() public static method

public static GetASCIIString ( IDataStream stream, ulong offset, ulong count ) : string
stream IDataStream
offset ulong
count ulong
return string

GetArbitraryInt() public static method

public static GetArbitraryInt ( byte data, int offset, int intSize ) : long
data byte
offset int
intSize int
return long

GetArbitraryUInt() public static method

public static GetArbitraryUInt ( IDataStream stream, ulong offset, int intSize ) : ulong
stream IDataStream
offset ulong
intSize int
return ulong

GetArbitraryUInt() public static method

public static GetArbitraryUInt ( byte data, int offset, int intSize ) : ulong
data byte
offset int
intSize int
return ulong

GetByte() public static method

public static GetByte ( IDataStream stream, ulong offset ) : byte
stream IDataStream
offset ulong
return byte

GetBytes() public static method

public static GetBytes ( IDataStream stream ) : byte[]
stream IDataStream
return byte[]

GetDiskSize() public static method

public static GetDiskSize ( SafeFileHandle handle ) : ulong
handle SafeFileHandle
return ulong

GetHexString() public static method

public static GetHexString ( IDataStream stream, ulong offset, ulong count ) : string
stream IDataStream
offset ulong
count ulong
return string

GetInt16() public static method

public static GetInt16 ( IDataStream stream, ulong offset ) : short
stream IDataStream
offset ulong
return short

GetInt24() public static method

public static GetInt24 ( IDataStream stream, ulong offset ) : int
stream IDataStream
offset ulong
return int

GetInt32() public static method

public static GetInt32 ( IDataStream stream, ulong offset ) : int
stream IDataStream
offset ulong
return int

GetInt64() public static method

public static GetInt64 ( IDataStream stream, ulong offset ) : long
stream IDataStream
offset ulong
return long

GetRandomString() public static method

public static GetRandomString ( int length ) : string
length int
return string

GetUInt16() public static method

public static GetUInt16 ( IDataStream stream, ulong offset ) : ushort
stream IDataStream
offset ulong
return ushort

GetUInt24() public static method

public static GetUInt24 ( IDataStream stream, ulong offset ) : uint
stream IDataStream
offset ulong
return uint

GetUInt32() public static method

public static GetUInt32 ( IDataStream stream, ulong offset ) : uint
stream IDataStream
offset ulong
return uint

GetUInt64() public static method

public static GetUInt64 ( IDataStream stream, ulong offset ) : ulong
stream IDataStream
offset ulong
return ulong

GetUnicodeString() public static method

public static GetUnicodeString ( IDataStream stream, ulong offset, ulong count ) : string
stream IDataStream
offset ulong
count ulong
return string

Sanitise() public static method

Removes any special characters from the string.
public static Sanitise ( string message ) : string
message string
return string

SpacifyEnum() public static method

public static SpacifyEnum ( string s ) : string
s string
return string

StrLen() public static method

public static StrLen ( IDataStream stream, ulong offset, ulong max ) : ulong
stream IDataStream
offset ulong
max ulong
return ulong