ln.templates/ln.templates/streams/CharStream.cs

21 lines
474 B
C#

using System;
using System.Text;
namespace ln.templates.streams
{
public class CharStream : PeekAbleStream<char>
{
public CharStream(char[] buffer)
:base(buffer)
{
}
public CharStream(byte[] byteBuffer, Encoding encoding)
: this(encoding.GetChars(byteBuffer))
{
}
public CharStream(byte[] byteBuffer)
:this(Encoding.UTF8.GetChars(byteBuffer))
{
}
}
}