views:

39

answers:

3

I'm using Visual Studio 2010 to develop a C# Application. It retrieves a Shoutcast Stream. It reads 256 Bytes in each loop-cycle and is supposed to write them to the debug-output. They are stripped badly.

Could this be due to some Unicode-signs? How can I make output-window-safe Strings which won't get stripped?

A: 

You haven't shown how you're writing them out, which makes it hard to know what's wrong.

If you're reading binary data, I would personally write that out in hex. BitConverter.ToString(byte[]) will do that very simply.

Jon Skeet
A: 

Do you mean it won't write them out ever, or just delayed? You can flush the stream to force it to write immediately.

Jess
A: 

@Jon: I'm writing them out by using an ASCII-Encoder:

ASCIIEncoding encoder = new ASCIIEncoding(); string stream = encoder.GetString(message, 0, bytesRead);

I'm just looking for the MetaData in the stream.

I'm searching for 'ARTIST=' in the Stream. then I get the substring until VORBIS. I got that working as well, but when I Debug.WriteLine the result-substring it won't show the whole Substring (which is usually around 60 characters long).

It gets stripped usually after the Artists name.

Ali
Do not add additional information as an "answer". You have ignored all the warnings that Stack Overflow gives you, and chosen to post against guidelines. If you wish to be a member of the community then you should respect the guidelines. Delete this "answer" and add additional information by editing your question.
Mystere Man