Questions tagged [binarystream]
39 questions
0
votes
4 answers
How to convert a binary string back into a string
Here is what i am trying to do.
I have a string :
String s="ch"
I convert it into a binary string in the following way
char ar[]=s.toCharArray();
StringBuilder sb= new StringBuilder("00"); /* i am appending to extra zeros because …

Manika
- 29
- 1
- 10
0
votes
2 answers
Unable to convert binary string to integer despite using parseInt in java
i want to get the integer i.e decimal number corresponding to the binary string nc. However this does not happen despite using parseInt().
for eg if nc="11000101" then edcode is also having the same value instead of giving me the decimal…

Manika
- 29
- 1
- 10
0
votes
0 answers
Find index of string in large file performance
I have a "container" containing data. The size is +- 100MB.
In the container there a several "dataids's" that mark the begin of something.
Now I need to get an index for an given dataid. (dataid for example: '4CFE7197-0029-006B-1AD4-000000000012')
I…

Stinus
- 309
- 1
- 3
- 18
0
votes
1 answer
DES Encryption: File bigger after enryption
I'm trying to write my own DES encryption program without using the .NET libraries.
However, after going through all the steps I noticed my file gets twice as big!
I'm reading from a txt file (byte by byte) into a list of BitArrays, and after a few…

DerpyNerd
- 4,743
- 7
- 41
- 92
0
votes
1 answer
Using HttpRequest in Windows Phone
I have a Binary stream that takes photo stream from the PhotoChooser Task in windows phone.
I am trying to upload the picture that the user chooses onto my web server.
How do I copy the photo stream to the HttpRequest Stream?
So far I have something…

user1775297
- 87
- 11
0
votes
1 answer
Reading 4 byte array sent as individual bytes
I'm writing this with C# and .net 2.0
I'm being sent a 4 byte array by a device as individual bytes.
I currently read this in the following way
while(m_ReadThreadisRunning)
{
if(canRead)
{
lock (m_Serialport)
{
try
{
…

Dave
- 161
- 1
- 4
- 18
-1
votes
1 answer
Convert binary string to hex for curl request
I have a struct pack like
def encode_number(value):
return struct.pack('>I', value)
def decode_number(raw):
return int.from_bytes(raw, byteorder='big')
>>> encode_number(1)
b'\x00\x00\x00\x01'
>>>…

Gautham Santhosh
- 797
- 1
- 10
- 21
-1
votes
3 answers
Visual C++ BinaryReader in Java
is there any method in java which would implement the same function as BinaryReader() in Visual C++

Chetan Gupta
- 11
- 3
-2
votes
2 answers
Create a File From Binary Data In C#
I am trying to read a file in binary and create a file of the same format with that binary, this file can be in any commom format like (.docx, .txt, .jpeg, .png ) etc.
I created a text file (test.txt) that has a string This is a text string written…

Huzaifa
- 345
- 4
- 15