C# Class Dicom.Network.RawPDU

Encapsulates PDU data for reading or writing
Datei anzeigen Open project: fo-dicom/mdcm Class Usage Examples

Public Methods

Method Description
MarkLength16 ( String name ) : void

Marks position to write 16-bit length value

MarkLength32 ( String name ) : void

Marks position to write 32-bit length value

RawPDU ( Stream s ) : System

Initializes new PDU reader from stream

RawPDU ( byte type ) : System

Initializes new PDU for writing

ReadByte ( String name ) : byte

Read byte from PDU

ReadBytes ( String name, int count ) : byte[]

Read bytes from PDU

ReadPDU ( ) : void

Reads PDU into memory

ReadString ( String name, int count ) : String

Reads string from PDU

ReadUInt16 ( String name ) : ushort

Read ushort from PDU

ReadUInt32 ( String name ) : uint

Reads uint from PDU

Reset ( ) : void

Reset PDU read stream

Save ( String file ) : void

Saves PDU to file

SkipBytes ( String name, int count ) : void

Skips ahead in PDU

ToString ( ) : String

Gets string describing this PDU

Write ( String name, String value ) : void

Writes string to PDU

Write ( String name, String value, int count, char pad ) : void

Writes string to PDU

Write ( String name, byte value ) : void

Writes byte to PDU

Write ( String name, byte value, int count ) : void

Writes byte to PDU multiple times

Write ( String name, uint value ) : void

Writes uint to PDU

Write ( String name, ushort value ) : void

Writes ushort to PDU

WriteLength16 ( ) : void

Writes 16-bit length to top length marker

WriteLength32 ( ) : void

Writes 32-bit length to top length marker

WritePDU ( Stream s ) : void

Writes PDU to stream

Private Methods

Method Description
CheckOffset ( int bytes, String name ) : void
ToCharArray ( String s, int l, char p ) : char[]

Method Details

MarkLength16() public method

Marks position to write 16-bit length value
public MarkLength16 ( String name ) : void
name String Field name
return void

MarkLength32() public method

Marks position to write 32-bit length value
public MarkLength32 ( String name ) : void
name String Field name
return void

RawPDU() public method

Initializes new PDU reader from stream
public RawPDU ( Stream s ) : System
s Stream Input stream
return System

RawPDU() public method

Initializes new PDU for writing
public RawPDU ( byte type ) : System
type byte Type of PDU
return System

ReadByte() public method

Read byte from PDU
public ReadByte ( String name ) : byte
name String Name of field
return byte

ReadBytes() public method

Read bytes from PDU
public ReadBytes ( String name, int count ) : byte[]
name String Name of field
count int Number of bytes to read
return byte[]

ReadPDU() public method

Reads PDU into memory
public ReadPDU ( ) : void
return void

ReadString() public method

Reads string from PDU
public ReadString ( String name, int count ) : String
name String Name of field
count int Length of string
return String

ReadUInt16() public method

Read ushort from PDU
public ReadUInt16 ( String name ) : ushort
name String Name of field
return ushort

ReadUInt32() public method

Reads uint from PDU
public ReadUInt32 ( String name ) : uint
name String Name of field
return uint

Reset() public method

Reset PDU read stream
public Reset ( ) : void
return void

Save() public method

Saves PDU to file
public Save ( String file ) : void
file String Filename
return void

SkipBytes() public method

Skips ahead in PDU
public SkipBytes ( String name, int count ) : void
name String Name of field
count int Number of bytes to skip
return void

ToString() public method

Gets string describing this PDU
public ToString ( ) : String
return String

Write() public method

Writes string to PDU
public Write ( String name, String value ) : void
name String Field name
value String Field value
return void

Write() public method

Writes string to PDU
public Write ( String name, String value, int count, char pad ) : void
name String Field name
value String Field value
count int Number of characters to write
pad char Padding character
return void

Write() public method

Writes byte to PDU
public Write ( String name, byte value ) : void
name String Field name
value byte Field value
return void

Write() public method

Writes byte to PDU multiple times
public Write ( String name, byte value, int count ) : void
name String Field name
value byte Field value
count int Number of times to write PDU value
return void

Write() public method

Writes uint to PDU
public Write ( String name, uint value ) : void
name String Field name
value uint Field value
return void

Write() public method

Writes ushort to PDU
public Write ( String name, ushort value ) : void
name String Field name
value ushort Field value
return void

WriteLength16() public method

Writes 16-bit length to top length marker
public WriteLength16 ( ) : void
return void

WriteLength32() public method

Writes 32-bit length to top length marker
public WriteLength32 ( ) : void
return void

WritePDU() public method

Writes PDU to stream
public WritePDU ( Stream s ) : void
s Stream Output stream
return void