NHibernate.Lob.External.ExternalClobType.WriteLobTo C# (CSharp) Method

WriteLobTo() protected method

protected WriteLobTo ( object lob, Stream output ) : void
lob object
output Stream
return void
		protected override void WriteLobTo(object lob, Stream output)
		{
			Clob clob = lob as Clob;
			if (clob == null) return;
			if (compression == null)
				using (StreamWriter sw = new StreamWriter(output, encoding))
					clob.WriteTo(sw);
			else
				using (Stream cs = compression.GetCompressor(output))
				using (StreamWriter sw = new StreamWriter(cs, encoding))
					clob.WriteTo(sw);
		}