using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
namespace umbraco.BusinessLogic.Utils
{
///
/// A TextWriter class based on the StringWriter that can support any encoding, not just UTF-16
/// as is the default of the normal StringWriter class
///
public class EncodedStringWriter : StringWriter
{
///
/// Initializes a new instance of the class.
///
/// The sb.
/// The enc.
public EncodedStringWriter(StringBuilder sb, Encoding enc)
: base(sb)
{
m_encoding = enc;
}
private Encoding m_encoding;
///
/// Gets the in which the output is written.
///
///
/// The Encoding in which the output is written.
public override Encoding Encoding
{
get
{
return m_encoding;
}
}
}
}