public virtual void TestInfoStream() { try { FieldCache cache = Lucene.Net.Search.FieldCache_Fields.DEFAULT; System.IO.MemoryStream bos = new System.IO.MemoryStream(1024); System.IO.StreamWriter writer = new System.IO.StreamWriter(bos); cache.SetInfoStream(writer); double[] doubles = cache.GetDoubles(reader, "theDouble"); float[] floats = cache.GetFloats(reader, "theDouble"); char[] tmpChar; byte[] tmpByte; writer.Flush(); tmpByte = bos.GetBuffer(); tmpChar = new char[bos.Length]; System.Array.Copy(tmpByte, 0, tmpChar, 0, tmpChar.Length); Assert.IsTrue(new System.String(tmpChar).IndexOf("WARNING") != -1); } finally { Lucene.Net.Search.FieldCache_Fields.DEFAULT.PurgeAllCaches(); } }