Joutsen Persistence v0.3.0+1-ga730d6d
Public Member Functions | List of all members
Joutsen.Persistence.Lobs.StreamClob Class Reference

A Clob implementation that works with readable streams as their data. More...

Public Member Functions

 StreamClob (Stream stream, Encoding encoding)
 Creates a new instance for a stream. More...
 
 StreamClob (StreamReader reader)
 Creates a new instance for a TextReader. More...
 
override TextReader OpenReader ()
 Provides read access to the text of this Clob by providing a stream. More...
 
override bool Equals (object obj)
 
override int GetHashCode ()
 
- Public Member Functions inherited from Joutsen.Persistence.Lobs.Clob
abstract TextReader OpenReader ()
 Provides read access to the text of this Clob by providing a stream. More...
 
virtual void WriteTo (TextWriter writer)
 Writes the data of this Clob to a TextWriter. More...
 
virtual void WriteTo (Stream output, Encoding encoding)
 Writes the data of this Clob to a stream. More...
 

Additional Inherited Members

- Static Protected Attributes inherited from Joutsen.Persistence.Lobs.Clob
const int BUFFERSIZE = 2048
 Size of the bufer for all buffered operations. More...
 

Detailed Description

A Clob implementation that works with readable streams as their data.

Since
0.3.0

Constructor & Destructor Documentation

◆ StreamClob() [1/2]

Joutsen.Persistence.Lobs.StreamClob.StreamClob ( Stream  stream,
Encoding  encoding 
)

Creates a new instance for a stream.

Parameters
streamthe stream containing the data
encodingthe encoding to use for reading
Remarks
The new instance does not handle closing of the provided stream. Closing and disposing the stream needs to be handled outside of the StreamClob instance.

◆ StreamClob() [2/2]

Joutsen.Persistence.Lobs.StreamClob.StreamClob ( StreamReader  reader)

Creates a new instance for a TextReader.

Parameters
readerthe reader with access to the data
Remarks
The new instance does not handle closing of the provided reader. Closing and disposing the reader and underlying stream needs to be handled outside of the StreamClob instance.

Member Function Documentation

◆ Equals()

override bool Joutsen.Persistence.Lobs.StreamClob.Equals ( object  obj)

◆ GetHashCode()

override int Joutsen.Persistence.Lobs.StreamClob.GetHashCode ( )

◆ OpenReader()

override TextReader Joutsen.Persistence.Lobs.StreamClob.OpenReader ( )
virtual

Provides read access to the text of this Clob by providing a stream.

Returns
a reader that provides read access to the data
Remarks
The returned reader is not managed and needs to be disposed of outside of this method.

Implements Joutsen.Persistence.Lobs.Clob.