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

Java/Android- Convert InputStream to string

I am reading a constant stream of data coming from a device via Bluetooth. I'm wondering how I can convert this data to a string and print it out? The buffer will contain an ASCII string but when I run it it prints out integers, i would like to be…
Collin Urie
  • 169
  • 1
  • 11
5
votes
1 answer

dir /r and output stream in Windows Machine

We had a challenge today at our cybersec class, and at a point of time (in a Windows Machine via terminal) I found an interesting file with dir called root.txt By more root.txt I got the output Look deeper..., which led me to try dir /a to see if…
bashbin
  • 415
  • 1
  • 7
  • 21
5
votes
2 answers

Raw Stream Has Data, Deflate Returns Zero Bytes

I'm reading data (an adCenter report, as it happens), which is supposed to be zipped. Reading the contents with an ordinary stream, I get a couple thousand bytes of gibberish, so this seems reasonable. So I feed the stream to DeflateStream. First,…
user565869
5
votes
0 answers

Kafka Streams can not recover in case of Exception while processing Messages

I am playing with Kafka Streams and faced a situation which seems a little odd to me. I did search on this but could not find a proper answer. While processing the elements in the stream, if any unhandled exception occurs, following error happens…
sezerug
  • 1,136
  • 9
  • 10
5
votes
1 answer

Reading really big blobs without downloading them in Google Cloud (streaming?)

please help! [+] What I have: A lot of blobs in every bucket. Blobs can vary in size from being less than a Kilo-byte to being lots of Giga-bytes. [+] What I'm trying to do: I need to be able to either stream the data in those blobs (like a…
user9773014
5
votes
1 answer

Return a file stream using SwashBuckle

I want to return a file stream using SwashBuckle [System.Web.Http.HttpGet] [System.Web.Http.Route("Files/{uid}/file")] [SwaggerResponse(HttpStatusCode.OK, Type = typeof(Byte[]))] public HttpResponseMessage DownloadFile(String uid,…
Zoltan Hernyak
  • 989
  • 1
  • 14
  • 35
5
votes
1 answer

Do I need to 'rewind' a stream before reading what was written to it?

With this code: using (var stream = new MemoryStream()) { thumbnail.Save(stream); // you get the idea stream.Position = 0; // <- is this needed? WriteStreamToDisk(stream); } If I have a method writing to a memory stream, and then I want…
Thomas
  • 10,933
  • 14
  • 65
  • 136
5
votes
2 answers

write after end stream error

I work with NodeJS Transform stream that reads data from a Readable flow stream then converts it. When I destroy the Transform stream sometimes I get an error because the destroy function unpipes the Transfrom stream itself but do this async and if…
Lajos
  • 2,549
  • 6
  • 31
  • 38
5
votes
4 answers

C# - stream question

When I was writing some I/O routine in C++, I would usually make it as generic as possible, by operating on the interfaces from . For example: void someRoutine(std::istream& stream) { ... } How should the same be done in C#? I suspect I…
Yippie-Ki-Yay
  • 22,026
  • 26
  • 90
  • 148
5
votes
3 answers

Use Java 8 stream to convert enum to set

I have an enum looks like: public enum Movies { SCIFI_MOVIE("SCIFI_MOVIE", 1, "Scifi movie type"), COMEDY_MOVIE("COMEDY_MOVIE", 2, "Comedy movie type"); private String type; private int id; private String name; Movies(String type, int id, String…
Happy Lemon
  • 85
  • 1
  • 5
5
votes
2 answers

mongodb change streams java

Since this feature is relatively new (mongo 3.6) I found very few java examples. My questions: 1. What is the best practices for watching change streams? 2. Does it have to be a blocking call to watch the stream? (This means a thread per collection…
rotemjac
  • 51
  • 1
  • 3
5
votes
1 answer

Stream audio file from Google Cloud Storage to iOS Firebase client app

I'm using Firebase with an iOS client app, and I need to stream an audio file from Google Cloud Storage. I know file streaming support exists in the Android SDK with the class: StreamDownloadTask, but I cannot find an equivalent in the iOS SDK.…
Peza
  • 1,347
  • 1
  • 11
  • 23
5
votes
3 answers

Java Stream Keyboard Input

I am writing a program that takes commands via the console. However, I do not want to press "enter" in order to send that command. I want the code to constantly monitor what I am entering, and execute the code when I am finished. The commands are…
David
  • 1,296
  • 1
  • 15
  • 25
5
votes
1 answer

Streaming a binary file to Google Storage using Tornado

I'm trying to stream a binary file from a client request to Google Cloud Storage through my server. I'm using the Tornado framework to stream the data from the request to the server and Google Cloud Storage API for streaming the file to Google…
Liad Amsalem
  • 413
  • 1
  • 6
  • 14
5
votes
9 answers

C# "using" blocks

I've got something like the code below...someone here mentioned that the WebClient, Stream, and StreamReader objects could all benefit from using blocks. Two easy questions: 1: How would this little snippet look with using blocks? I've no problem…
J Benjamin
  • 4,722
  • 6
  • 29
  • 39
1 2 3
99
100