stream

web audio stream player without Flash

hi, I'd like to build a web radio with functions play/pause/stop/change channels with my own GUI. How can I do it without Flash? thanks Jul ...

After fopen, can I search for a keyword in PHP?

If I use fopen on a file, is there any way to scan through the file to find the number of bytes a certain keyword begins at? If not, how can I do this? ...

Use-cases for Streams in Scala

In Scala there is a Stream class that is very much like an iterator. The topic Difference between Iterator and Stream in Scala? offers some insights into the similarities and differences between the two. Seeing how to use a stream is pretty simple but I don't have very many common use-cases where I would use a stream instead of other a...

Scala, repeat a finite list infinitely

Hello guys, I want to use Stream class in scala to repeat a given list infinitely. For example the list (1,2,3,4,5) I want to create a stream that gives me (1,2,3,4,5,1,2,3,4,5,1,2,3....) So that I can wrap the take operation. I know this can be implemented in other ways, but I wanna do it this way for some reason, just humor me :) S...

Is it possible to use MMS to stream Internet radio in Android?

Is possible to play an Internet radio stream in Android? And since most of the Internet radios use MMS to stream their content is that possible using Android? ...

building up char * for network stream communication

Hello, I need to create a char * which has the following layout: length of username in network byte order (htonl) username length of password in network byte order (htonl) password 7 null characters (\0) length of the char * in network byte order (htonl) Can someone provide some advise as to how to build up this char * concatenating t...

Add mime type to HTML link

I know how to change the MIME type in a webserver. I used this to make sure the browser downloads my .scrpt file instead of opening the plain text version. So far so good but is it possible to do the same with a link? I would like to link to a file on GitHub but this will open as a plain text file. Can I add a "MIME type attribute" to th...

Closing a stream after an exception

I open a stream and then deserialize the data in the stream. However, I added a member to the SavedEventSet object so now when I try to open an old file, it throws the exception on the deserialization line. This is fine with me (for now) but the problem is that I handle the exception, but never close the stream (because the exception o...

platform-independent /dev/null output sink for Java

Other than an anonymous class (new OutputStream() { ... }), can anyone suggest a moral equivalent of new FileOutputStream("/dev/null") that also works on Windows? In case someone's wondering 'what's this for?' I have a program that does a consistency analysis on a file. It has a 'verbose' option. When the verbose option is on, I want t...

Are there libraries to develop a audio streaming client on the mac or iPhone?

Before reinventing the wheel, I'd better check out if there are solutions I can buy or get for free? I want to make a little web radio streaming app for my sister. Maybe there's a library that can play streams from the web? ...

Which frameworks / libraries should I take a look at when I want to play an audio livestream on the iPhone?

For example, if I wanted to play back an shoutcast web radio audio stream on the iPhone, what libs could I use for this? ...

Start process from stream

I have a memory stream that contains a PDF file. Is it possible to view the PDF without saving it to the hard disk ? Process.Start() only takes a path and not a stream. Thank you ...

Reading large text files with streams in C#

Hello again, I've got the lovely task of working out how to handle large files being loaded into our application's script editor (its like VBA for our internal product for quick macros). Most files are about 300-400Kb which is fine loading. But when they go beyond 100Mb the process has a hard time as you'd expect. What happens is that ...

Why is WCF Stream response getting corrupted on write to disk?

I am wanting to write a WCF web service that can send files over the wire to the client. So I have one setup that sends a Stream response. Here is my code on the client: private void button1_Click(object sender, EventArgs e) { string filename = System.Environment.CurrentDirectory + "\\Picture.jpg"; if (File.Exists(filename)) ...

Why the buffer size changes my stream output?

I'm trying to stream a pdf file. Most of the files open without any problems but sometimes it fails. When it fails, it also looks like file size is smaller than the original one. For example, I was trying to open a 47K file but when the streamed output to the browser it's only 44.5K. When check the size of the stream (result.FileStre...

C#, attach multiple files to an email programticaly without writing to disk

Our project has files stored in a sql server db as blobs. I'd like to get the files from the database and attach multiple files to an email without writing to disk. This is what I have so far(everything works ok, with no attachments): // snip List<System.Net.Mail.Attachment> attachments = null; // Attachments is a child list of Mess...

Rewriting a tcp stream on the fly: how difficult is it? How about taking a dump of said stream?

I'm trying to write a tcp stream 'tunnel' (similar to the ones SSH handles by default) but with one exception, I have to rewrite certain information as it flows through. I'm certain there's something similar out there but I have not been able to find it. I have three main questions: Is there an easy way to save a tcp stream for obser...

Using std::streams to format output

I have an object that I want to be able to stream. But I want to be able to stream it in different ways by using different formats, or should I say ways to describe this object. And I wonder how this is supposed to be solved with streams. What I want is to be able to use a generic format and use some kind of format adapter to transform...

when communication is happening with b/n c# code on win and java code on unix, some junk characters come into the stram. the problem happens intermittently.any solutions/workarounds?

here is the code on unix box(client): else if (strIn.startsWith("GET")) { PrintLog("GET command received..."); //COMPRESSION String filename = parameter; File getfile = new File(filename); if (getfile.exists()) { PrintLog("Compre...

Any tutorial to understand Streams, Buffers and their usage in Java?

I have been coding Java for a while, but I have to admit that I don't get streams, buffers, etc. 100% I have tried to find a good tutorial on the subject that explains the reasoning behind them and their patterns of usage, but I couldn't find any. Only short, isolated snippets that don't help. Is there something out there? ...