Questions tagged [bytestream]

A bytestream is a series of bytes.

Formally, a byte stream is a certain abstraction, a communication channel down which one entity can send a sequence of bytes to the entity on the other end. Such channel is often bidirectional, but sometimes unidirectional. In almost all instances, the channel has the property that it is reliable; i.e. exactly the same bytes emerge, in exactly the same order, at the other end.

Less formally, one can think of it as a conduit between the two entities; one entity can insert bytes into the conduit, and the other entity then receives them. This conduit can be ephemeral or persistent.

See more:

173 questions
0
votes
0 answers

modifying bytes stream of a pdf

I am receiving a byte stream by calling a rest endpoint which represents a pdf, and this pdf is just a template with placeholders for fields like firstName, lastName etc. Now I want to play with the byte stream (convert to some object maybe?)…
Abhijeet Ahuja
  • 5,596
  • 5
  • 42
  • 50
0
votes
1 answer

How to locate image from a Bytes Android

Currently i have byte array. Which contains a .jpg file also some other unwanted data. What I wanted to do is to find out the position of data "FF D8" (start of JPEG data). Same Code in iOS is : https://stackoverflow.com/a/18477915/5215474
Saranjith
  • 11,242
  • 5
  • 69
  • 122
0
votes
0 answers

Nested Ajax Call, Inner call runs twice

I'm new in MVC, I have two Call Ajax, want to use result of the first call in a second call, but the results comes back two times. second call ajax shows image of one of the results in first call ajax. this is my action in the controller: public…
R.Mrz
  • 1
  • 6
0
votes
0 answers

Android Get Songs Sent by Other User Through Wifi

So basically what I want is to have a "host" be able to receive a stream of songs sent by other users over wifi. I'm wondering if you're able to send song audio files through a byte stream or if I'm better off to just use song names sent as strings.…
Caleb lee
  • 43
  • 7
0
votes
0 answers

How to check that byte stream contains even number?

I'm new to Java and I need to create a method checking that byte stream contains even number. I've already written some code, but I think it's horrible, and don't know how to test it. It seems to me there is some short and efficient way to do that…
aLittleMind
  • 183
  • 2
  • 3
  • 12
0
votes
1 answer

How to implement a exercise in The Go Programming Language

Exercise 7.5: The LimitReader function in the io package accepts an io.Reader r and a number of bytes n, and returns another Reader that reads from r but reports an end-of-file condition after n bytes. Implement it. func LimitReader(r io.Reader, n…
LWH
  • 97
  • 3
  • 11
0
votes
1 answer

Why is my Logstash handler throwing a TypeError?

I'm creating a custom logger with the following code: import logging import logstash from socket import gethostname class CustomLogger(logging.Logger): def _log(self, level, msg, args, exc_info=None, extra=None): if extra is None: …
erip
  • 16,374
  • 11
  • 66
  • 121
0
votes
2 answers

Whats the difference between getBytes("UTF-8"), getBytes("windows-1252") and getBytes()?

I have following code which produces confusing output.. import java.io.UnsupportedEncodingException; import java.nio.charset.Charset; public class Main { String testString = "Moage test String"; public static void…
Mansouritta
  • 166
  • 1
  • 1
  • 10
0
votes
2 answers

How do I write bytes to a file based on a long with SecureRandom().nextBytes?

For my java class, part of my project involves getting a encryption key length from the user and rounding that up to the nearest multiple of 1024. The length is passed as a long. In my method I get the long and I get the file path to write to. In…
0
votes
1 answer

RabbitMQ and Audiofiles

How to send an audio file as message in Cloudamqp? I'm guessing I need its byte stream and send it as a JSON. But I'm not sure if that is possible. Or do I just send the link of the location of the audio file for download?
0
votes
1 answer

Android: does ByteStreams.toByteArray change content of source

In my code I want the following functionality : InputStream is = getInputStream() byte[] buffer = ByteStreams.toByteArray(is); function1(buffer) function2(is) But what I observe is that if ByteStreams.toByteArray(is); is called then function2 is…
png
  • 4,368
  • 7
  • 69
  • 118
0
votes
1 answer

C# Find sequence of bytes in memory

Im trying to find out if there is a simple way of searching for a sequence of bytes in a programs memory. More specifically, I want to search through a dll that is loaded into memory and find the VA/RVA of the address where those bytes are. Is this…
Zeller33
  • 181
  • 2
  • 4
  • 16
0
votes
2 answers

D: decoding ubyte[] to string, redux

This question is a modified redux of this previous question: how to decode ubyte[] to a specified encoding? I'm looking for an idiomatic way to convert the ubyte[] array returned from a std.zip.ArchiveMember.expandedData attribute into a string or…
joduncan
  • 33
  • 5
0
votes
0 answers

Converting 1D int[] array to 1D byte[]array

I've got a problem with my project. My program load bytes to a buffer(it's 1D bytes array), when I want to set the offset of my data I create a 2D int[] array, then i convert this to the 1D int array, the last step is to convert 1D int array to 1D…
0
votes
1 answer

Take out video length from IDR or non-IDR (H.264/AVC – Bitstream Organization)

I have a stream for a flash player that comes from H.264 Chunks - SPS, PPS, IDR and non-IDR. So far the FLV stucture is generated from the bytearray. The only problem left for me is to understand how I can get those Timestamp UI24 that FLVTag need.…