Questions tagged [stream]

DO NOT USE FOR THE JAVA STREAM API INTRODUCED IN JAVA 8 (use [java-stream] for those questions!) A stream is a series of data elements which can be accessed in a serial fashion.

A stream is a series of data elements (characters, bytes or complex packets) which can be accessed or made accessible in a serial fashion. Random access is not possible.

The term stream is also used for streaming media, a method in which the media can be played while it is being accessed (no full download required). The ability to stream media is largely dependent on the container format used. Seeking functionality in streaming media is typically achieved through a different protocol, for example RTSP or HTTP 1.1's Range function.

15725 questions
5
votes
1 answer

How to fix view controller hierarchy for AVPlayer?

I have an iOS app with a single player and login. It should work like this: 1) Run app 2) login 3) after login video directly starts playing 4) if you exit the video it should ask for whether you want to logout 5) if no should continue to playing…
C.Aglar
  • 1,290
  • 2
  • 14
  • 30
5
votes
3 answers

How to record an audio stream for save it in file / swift 4.2

I am creating a radio application for iPhone (coded in Swift 4.2) and I want to add a function allowing me to record and save in a file, the sound produced by my radio (read from an AVPlayer) when I push a button. Which code should I use? The code…
NicoCraft
  • 91
  • 1
  • 11
5
votes
2 answers

Can redis key space notifications be pushed to the redis stream instead of pub/sub channel

We have a requirement that we need to get a notification on changes to a Redis data structure. Based on my research I found out that I can use Redis key space notifications for doing the same. However, Redis key space notifications send the events…
Rishabh
  • 105
  • 2
  • 11
5
votes
1 answer

Java zip files from streams instantly without using byte[]

I want to compress multiples files into a zip files, I'm dealing with big files, and then download them into the client, for the moment I'm using this: @RequestMapping(value = "/download", method = RequestMethod.GET, produces =…
Abdennacer Lachiheb
  • 4,388
  • 7
  • 30
  • 61
5
votes
3 answers

How to write byte or stream to Apache Camel FTP to transfer file

In my code currently, I get data from the database and then I write a file out of the data. I have this kind of camel route and working solution:- private static final String INPUT_FILE_DIRECTORY_URI = "file:" + System.getProperty("user.home") …
masiboo
  • 4,537
  • 9
  • 75
  • 136
5
votes
1 answer

Java create tar archive with entries of unknown size

I have a web app where I need to be able to serve the user an archive of multiple files. I've set up a generic ArchiveExporter, and made a ZipArchiveExporter. Works beautifully! I can stream my data to my server, and archive the data and stream it…
MeetTitan
  • 3,383
  • 1
  • 13
  • 26
5
votes
2 answers

What is the `pipe` method in NodeJS?

I see this method in use in many cases but I cannot understand what it does. An example: var net = require('net'); var server = net.createServer(function(connection) { console.log('client connected'); connection.on('end', function() { …
Billie
  • 8,938
  • 12
  • 37
  • 67
5
votes
1 answer

How to make a video stream http GET request to img html tag with axios?

I have a Django 2.1 backend that have a video stream endpoint and a Vue-Cli3 as my frontend. The videostream endpoint in my backend is a GET request. To have the streaming working in my client side all i needed was to add:
Marcelo Fonseca
  • 1,705
  • 2
  • 19
  • 38
5
votes
1 answer

Java Streams TakeUntil 100 Elements filtered/collected

I want to use streams like: List result = myArr .stream() .filter(line -> !"foo".equals(line)) .collect(Collectors.toList()); but stop the filtering as soon as I have maximum 100 Elements ready to be collected. How can I achieve…
Phil
  • 7,065
  • 8
  • 49
  • 91
5
votes
1 answer

What happens if I do not close BufferedReader in java? (Stream type reading in multi-threaded program)

I have a multi-threaded program, in which I open a BufferedReader to read content from FIFO(named Pipe) file. As I want to implement stream type of solution to read text from FIFO file continuously, I have created a BufferedReader outside of thread…
Nomad
  • 751
  • 4
  • 13
  • 34
5
votes
1 answer

How to upload a file with PHP, curl and HTTP POST by streaming the file?

Lets say I have a large file that I want to HTTP POST to a webservice using PHP and curl. The file is larger than the amount of memory I can let PHP use. Basically I'm looking for a way to stream the content of a file directly to curl, without…
hovenko
  • 713
  • 7
  • 15
5
votes
2 answers

How to get a termination reason from a recursive function?

Suppose a function is looped to produce a numeric result. The looping is stopped either if the iterations maximum is reached or the "optimality" condition is met. In either case, the value from the current loop is output. What is a functional way…
schrödingcöder
  • 565
  • 1
  • 9
  • 18
5
votes
1 answer

Server-sent events with node.js http2 module - how should I use it with stream / pushStream?

I am trying to implement a server which send large amount of data (objects, not files) every 500 ms. After some reading, Server-sent events over http2 seems like the fastest option (due to http2 being a binary protocol and SSE reduce the traffic…
yuval.bl
  • 4,890
  • 3
  • 17
  • 31
5
votes
1 answer

Web server - how to parse requests? Asynchronous Stream Tokenizer?

I'm attempting to create a simple webserver in C# in asynchronous socket programming style. The purpose is very narrow - a Comet server (http long-polling). I've got the windows service running, accepting connections, dumping request info to the…
Jason Kleban
  • 20,024
  • 18
  • 75
  • 125
5
votes
1 answer

how to set the badbit of a stream by a customized streambuf

I've a customized std::streambuf. Something like: class mybuf : public std::streambuf { ... virtual std::streambuf::int_type underflow() { if(eof) { return traits_type::eof(); } ... } ... std::istream stream(new…
powerpete
  • 2,663
  • 2
  • 23
  • 49