public static String ReadStream(Stream istream)
{
try
{
var sb = new StringBuilder(1024);
var chars = new byte[BufferSize];
while ((istream.Read(chars, 0, chars.Length)) > -1)
{
string s = Encoding.ASCII.GetString(chars);
sb.Append(s);
}
return sb.ToString();
}
catch (IOException e)
{
#if logging
LOGGER.Error("Exception", e);
#endif
throw new EncogError(e);
}
}
#endif