SweetLib/Docs/SweetLib.IO.md
2018-04-06 21:57:55 +02:00

34 KiB

Contents #

SweetLib.IO # =

IStreamable # =

Namespace

SweetLib.IO.Classes.Streaming

Summary

Streamable objects

LoadFromStream(stream) method # =

Summary

Loads the object from a given stream.

Parameters
Name Type Description
stream System.IO.Stream Stream from which the object is loaded.

SaveToStream(stream) method # =

Summary

Saves the current object into a stream.

Parameters
Name Type Description
stream System.IO.Stream Stream in which the current object should be saved.

StreamException # =

Namespace

SweetLib.IO.Classes.Streaming

Summary

Exception thrown by streaming related operations.

#ctor() constructor # =

Summary

Creates a new StreamException.

Parameters

This constructor has no parameters.

#ctor(message) constructor # =

Summary

Creates a new StreamException.

Parameters
Name Type Description
message System.String Exception message.

StreamManager # =

Namespace

SweetLib.IO.Classes.Streaming

Summary

StreamManager wraps some useful methods for custom implementations of object streaming.

LoadFromStream(stream,value) method # =

Summary

Loads a String from a given Stream.

Parameters
Name Type Description
stream System.IO.Stream Stream from which the String will be loaded.
value System.String@ Contains the loaded String value.

LoadFromStream(stream,value) method # =

Summary

Loads a Boolean from a given Stream.

Parameters
Name Type Description
stream System.IO.Stream Stream from which the Boolean will be loaded.
value System.Boolean@ Contains the loaded Boolean value.

LoadFromStream(stream,value) method # =

Summary

Loads a Char from a given Stream.

Parameters
Name Type Description
stream System.IO.Stream Stream from which the Char will be loaded.
value System.Char@ Contains the loaded Char value.

LoadFromStream(stream,value) method # =

Summary

Loads a Int32 from a given Stream.

Parameters
Name Type Description
stream System.IO.Stream Stream from which the Int32 will be loaded.
value System.Int32@ Contains the loaded Int32 value.

LoadFromStream(stream,value) method # =

Summary

Loads a Int64 from a given Stream.

Parameters
Name Type Description
stream System.IO.Stream Stream from which the Int64 will be loaded.
value System.Int64@ Contains the loaded Int64 value.

LoadFromStream(stream,value) method # =

Summary

Loads a String from a given Stream.

Parameters
Name Type Description
stream System.IO.Stream Stream from which the String will be loaded.
value System.Single@ Contains the loaded String value.

LoadFromStream(stream,value) method # =

Summary

Loads a Double from a given Stream.

Parameters
Name Type Description
stream System.IO.Stream Stream from which the Double will be loaded.
value System.Double@ Contains the loaded Double value.

LoadFromStream(stream,value) method # =

Summary

Loads a DateTime from a given Stream.

Parameters
Name Type Description
stream System.IO.Stream Stream from which the DateTime will be loaded.
value System.DateTime@ Contains the loaded DateTime value.

LoadFromStream(stream,value) method # =

Summary

Loads a Stream from a given Stream.

Parameters
Name Type Description
stream System.IO.Stream Stream from which the Stream will be loaded.
value System.IO.Stream@ Contains the loaded Stream value.

SaveToStream(stream,value) method # =

Summary

Adds a String to a given Stream.

Parameters
Name Type Description
stream System.IO.Stream Stream to which the String will be added.
value System.String String value to add.

SaveToStream(stream,value) method # =

Summary

Adds a Boolean to a given Stream.

Parameters
Name Type Description
stream System.IO.Stream Stream to which the Boolean will be added.
value System.Boolean Boolean value to add.

SaveToStream(stream,value) method # =

Summary

Adds a Char to a given Stream.

Parameters
Name Type Description
stream System.IO.Stream Stream to which the Char will be added.
value System.Char Char value to add.

SaveToStream(stream,value) method # =

Summary

Adds a Int32 to a given Stream.

Parameters
Name Type Description
stream System.IO.Stream Stream to which the Int32 will be added.
value System.Int32 Int32 value to add.

SaveToStream(stream,value) method # =

Summary

Adds a Int64 to a given Stream.

Parameters
Name Type Description
stream System.IO.Stream Stream to which the Int64 will be added.
value System.Int64 Int64 value to add.

SaveToStream(stream,value) method # =

Summary

Adds a Single to a given Stream.

Parameters
Name Type Description
stream System.IO.Stream Stream to which the Single will be added.
value System.Single Single value to add.

SaveToStream(stream,value) method # =

Summary

Adds a Double to a given Stream.

Parameters
Name Type Description
stream System.IO.Stream Stream to which the Double will be added.
value System.Double Double value to add.

SaveToStream(stream,value) method # =

Summary

Adds a DateTime to a given Stream.

Parameters
Name Type Description
stream System.IO.Stream Stream to which the DateTime will be added.
value System.DateTime DateTime value to add.

SaveToStream(stream,value,resetSourceStream) method # =

Summary

Adds a Stream to a given Stream.

Parameters
Name Type Description
stream System.IO.Stream Stream to which the Stream will be added.
value System.IO.Stream Stream value to add.
resetSourceStream System.Boolean If true, the full given will be copied, otherwhise the stream will be copied from current position until its end.

StreamTypeException # =

Namespace

SweetLib.IO.Classes.Streaming

Summary

Exception thrown by streaming related operations. May be thrown if the stream types do not match.

#ctor() constructor # =

Summary

Creates a new StreamTypeException.

Parameters

This constructor has no parameters.

#ctor(message) constructor # =

Summary

Creates a new StreamTypeException.

Parameters
Name Type Description
message System.String Exception message.