[mono-android] System.IO.Stream.Length - not supported

conio konrad at konsoft.eu
Tue Feb 28 00:17:24 UTC 2012


Hey guys,
I am trying to access texture file (.dds) which I store in assets folder. To
do this I use Stream s = Assets.Open("model.dds");
Now, I want to read all bytes from this file, so usually in C# I use
BinaryReader.ReadBytes(Stream.Length). But, here when I in debug mode point
with mouse on Length field of this stream I get message that it's not
supported. Do you have any ideas how I can get length of this file in order
to read it?
For now I made loop when I read 1 byte till I get EndOfStreamException, but
it's not the most effective way of doing things. :)
Thanks for help, 
Konrad

--
View this message in context: http://mono-for-android.1047100.n5.nabble.com/System-IO-Stream-Length-not-supported-tp5520446p5520446.html
Sent from the Mono for Android mailing list archive at Nabble.com.


More information about the Monodroid mailing list