C# Class Plasma.pnHelpers

ファイルを表示 Open project: Hoikas/PlasmaDotNet

Public Methods

Method Description
GetBytes ( string hex ) : byte[]

Converts a hex string to a byte array.

GetString ( byte buf ) : string

Converts an array of Bytes to a hex String

ReadString ( Plasma.hsStream s ) : string

Reads in a UTF-16 string with an int32 size

ReadString ( Plasma.hsStream s, int maxSize ) : string

Reads in a UTF-16 string with an int16 size and a predefined maximum size

ReadUuid ( Plasma.hsStream s ) : System.Guid
WriteString ( Plasma.hsStream s, string data ) : void

Writes a UTF-16 string with an int32 size

WriteString ( Plasma.hsStream s, string data, int maxSize ) : void
WriteUuid ( Plasma.hsStream s, System.Guid uuid ) : void

Method Details

GetBytes() public static method

Converts a hex string to a byte array.
public static GetBytes ( string hex ) : byte[]
hex string
return byte[]

GetString() public static method

Converts an array of Bytes to a hex String
public static GetString ( byte buf ) : string
buf byte Array of Bytes to convert
return string

ReadString() public static method

Reads in a UTF-16 string with an int32 size
public static ReadString ( Plasma.hsStream s ) : string
s Plasma.hsStream Stream to read from
return string

ReadString() public static method

Reads in a UTF-16 string with an int16 size and a predefined maximum size
public static ReadString ( Plasma.hsStream s, int maxSize ) : string
s Plasma.hsStream Stream to read from
maxSize int Maximum string size
return string

ReadUuid() public static method

public static ReadUuid ( Plasma.hsStream s ) : System.Guid
s Plasma.hsStream
return System.Guid

WriteString() public static method

Writes a UTF-16 string with an int32 size
public static WriteString ( Plasma.hsStream s, string data ) : void
s Plasma.hsStream Stream to write to
data string String to write to the stream
return void

WriteString() public static method

public static WriteString ( Plasma.hsStream s, string data, int maxSize ) : void
s Plasma.hsStream
data string
maxSize int
return void

WriteUuid() public static method

public static WriteUuid ( Plasma.hsStream s, System.Guid uuid ) : void
s Plasma.hsStream
uuid System.Guid
return void