Questions tagged [binarystream]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
5 votes
1 answer
8k views

setting blob to null using PreparedStatement

I am creating webapplication using JSF2.0 where in mysql, I am storing images using datatype as MEDIUMBLOB. To insert values, I am using PreparedStatement as shown below. PreparedStatement psmnt = ...
Fahim Parkar's user avatar
  • 31.3k
5 votes
2 answers
2k views

How to create a binary stream (not a file) in Common Lisp?

I have a function which output some binary data to a stream. But the stream is abstract, which means the stream can be a file stream, or some other streams. But the stream must be a binary stream ...
kevin lynx's user avatar
4 votes
3 answers
8k views

BinaryReader - Reading a Single " BIT "?

Case : Again trying to capture packets through my NIC, I have developed 2 Extensions to use in capturing variable number of bits public static string ReadBits ( this BinaryReader Key , int ...
Ahmed Ghoneim's user avatar
4 votes
2 answers
7k views

C# BinaryReader Cannot access a closed file

Controller: private readonly Dictionary<string, Stream> streams; public ActionResult Upload(string qqfile, string id) { string filename; try ...
ShaneKm's user avatar
  • 21.1k
4 votes
2 answers
2k views

binary serialization, adding a new field to class - will it work?

I have a client and a server application which communicate over .NET 2.0 Remoting using binary serialization. A small change has been made to one of the data transfer object's interface and the ...
Andrew's user avatar
  • 295
3 votes
2 answers
3k views

How to consume MTOM SOAP web service in node.js?

I need to download or process a file from a soap based web service in node.js. can someone suggest me on how to handle this in node.js I tried with 'node-soap' or 'soap' NPM module. it worked for ...
Veer R's user avatar
  • 129
3 votes
2 answers
11k views

Retrieving file from bytea in PostgreSQL using java

Hi I'm using the below code to retrieve the file from the postgresql bytea using java, but inside the file I'm getting numbers like 314530413142313141 File file = new File("c:/test.doc"); ...
Sathish's user avatar
  • 4,543
2 votes
1 answer
1k views

How to read an unknown number of bytes from an input stream that may contain null characters?

I'm having some trouble reading an unknown amount of bytes (raw data, may contain NULLs) from a device using c in Linux. How can I read the device for "as long as it's ready to be read"? (hopefully ...
LinkOfTime's user avatar
1 vote
1 answer
10k views

Binary Stream To Uint8Array - JavaScript

I'm receiving the following Binary Stream from an HTTP request: HTTP REQUEST Document.get({id: $scope.documentId}, function(stream){ }); Angular Factory .factory('Document', ['$resource', '...
Jeremy Wagner's user avatar
1 vote
2 answers
924 views

Binary stream library in Objective C?

Is there an equivalent in Objective C to C#'s BinaryReader and BinaryWriter? For example, a BinaryReader would take an NSData* object (or a generalised stream), and would have methods such as -(...
Vladimir Gritsenko's user avatar
1 vote
1 answer
3k views

search for a binary string in binary file with python

Hi all am searching for a binary string in binary file using the python my binary file looks like a as follows. I want to find the bold text below. 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...
Madhu's user avatar
  • 15
1 vote
1 answer
2k views

Read Binary Data over TCP with Boost::Asio

My program receives binary data over a TCP-Connection. The connection is established using the boost::asio library. After reading the stream I need to return the received data as char*-Array. This is ...
Bobface's user avatar
  • 2,872
1 vote
1 answer
3k views

Search And Replace within A Binary Stream

I am trying to change a value in a bytestream array. I am looking for the Null value, and I want to change it to a space. When I try to access the array I get an error message "Type Mismatch". My VBS ...
Ofer B's user avatar
  • 419
1 vote
2 answers
988 views

Are there equivalent classes or functions to DataInputStream in Java for the iPhone to read binary information

Java provides classes DataInputStream and DataOutputStream to read/write binary data (as bytes) in a structured way like DataInputStream.readInt()/readLong()/read(byte[]) from a byte stream; likewise ...
Prabhu R's user avatar
  • 14.1k
1 vote
1 answer
717 views

How to send or stream base64 images with AJAX to Node.js Express server?

I am new to working with images in web development. We have a Node.js Express server that will run on Heroku and uses Cloudinary to store images. Ideally we could save images directly to Cloudinary, ...
Alexander Mills's user avatar
1 vote
1 answer
1k views

Inconsistent file size change while writing bytes from stream to a file

I have a file with size 10124, I am adding a byte array, which has length 4 in the beginning of the file. After that the file size should become 10128, but as I write it to file, the size decreased to ...
user3050564's user avatar
1 vote
1 answer
2k views

How can I efficiently stream large data from SQL Server 2008 to a web browser?

I'm using C# and ASP.NET MVC 3. Currently, I'm taking a large set of data from SQL Server, adding it into a StringBuilder, and then using System.Text.ASCIIEncoding to convert the StringBuilder object ...
TheDude's user avatar
  • 1,511
1 vote
1 answer
6k views

Is it possible to download a binary file from JSP?

I think is it quite possible, but I'm not sure. I don't have the possibility to use servlet directly, so I'm forced to use JSP ( long history, short time, you don't want to hear ) So I think ...
OscarRyz's user avatar
  • 198k
1 vote
0 answers
73 views

overflow error when reading file from external drive

I'm seeing an Overflow Error when trying to read a binary stream from an external SSD: with open(self.path, "rb") as input_file: input_file.seek(offset) data = input_file.read(...
tldr's user avatar
  • 12k
1 vote
1 answer
2k views

How to use streams to create binary data in nodejs?

I have a requirement to read a file from drive and pass it on to another API. The target API accepts binary data (like the data read using fs.readFile()) Following is the drive api code var fileId = ...
Pavan Andhukuri's user avatar
1 vote
0 answers
829 views

TypeError: string argument without an encoding with binary data

I am receiving a binary stream (over a socket) and converting it to bytearray. After running for about 6hrs (and sometimes even after few minutes) I am getting the following error: TypeError: string ...
Arpit's user avatar
  • 4,339
0 votes
1 answer
308 views

Converting PDF to Binary Stream in GAS for MS Graph API

I am fetching a PDF - getPDF() - to then upload to a Sharepoint Document Library. The following code fetches the PDF and creates a file called 'filename.pdf', however the file cannot be displayed ...
redditor's user avatar
  • 4,256
0 votes
2 answers
195 views

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 ...
Manika's user avatar
  • 29
0 votes
0 answers
118 views
+50

How to work with a "MIME type .pkpass file binary stream," or rather, how to send it as a response to the client and download it

I have been tasked with creating a simple feature that allows the users to fill a form and create an apple wallet pass (.pkpass) for themselves. I have decided to use Pass2u. My problem is, that after ...
Firippo's user avatar
  • 13
0 votes
0 answers
44 views

How to provide a single binary TCP stream to many clients?

I have a receiver, which provides a binary stream output on port 3001. But only one client can connect at the same time. E.g. With first netcat IP-ADDRESS 3001 I get binary data. If I start the second ...
ds14's user avatar
  • 1
0 votes
1 answer
504 views

Not able to Decompress the byte array of new secure QR code of Aadhar

I am trying to decompress the byte array using GZipStream but getting error of "Found invalid data while decoding." // getting aadhaar sample qr code data from // https://uidai.gov.in/images/resource/...
Paresh's user avatar
  • 1
0 votes
1 answer
356 views

Can not save binary using setBinaryStream to postgreSQL using java prepared statement

I have code to save binary to PostgreSQL, I am using JDK 1.5. but I got error.. And after I print the insert statement, then I try in my postgresql console, something error like this image: File ...
Ruslan Wahyudi's user avatar
0 votes
2 answers
2k views

IOUtils.toByteArray is returning empty byte array

I am new to Java development so apologies in advance if I am asking something stupid. I am trying to retrieve an image and it's thumbnail from sql database. I get data from ResultSet in BinaryStream ...
Umair Aamir's user avatar
  • 1,644
0 votes
1 answer
802 views

Display images in Carousel item

I'm working with ADF and need to display images in a Carousel. Have written the following code in servlet, but on page load it assign the value "weblogic.jdbc.wrapper.Blob_oracle_sql_BLOB@xxx " (xxx - ...
pankti's user avatar
  • 195
0 votes
4 answers
689 views

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 ...
Manika's user avatar
  • 29
0 votes
0 answers
154 views

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 ...
Stinus's user avatar
  • 319
0 votes
1 answer
95 views

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 ...
DerpyNerd's user avatar
  • 4,753
0 votes
1 answer
172 views

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 ...
user1775297's user avatar
0 votes
1 answer
708 views

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) ...
Dave's user avatar
  • 161
0 votes
1 answer
558 views

Reading an Excel File using BinaryStream reader Without using Microsoft Office DLL

I'm trying to read an excel file from the input Stream. I want to read line by line and save the column information from Excel to Database. I'm unable to read the file, Can any one help me to figure ...
KNC's user avatar
  • 94
0 votes
3 answers
2k views

Migrate FileReader ReadAsBinaryString() to ReadAsArrayBuffer() or ReadAsText()

I realize that the new Mozilla Firefox return allocation size overflow (on FileReader.ReadAsBinaryString()) when the file bigger than 200MB (something like that). Here's some of my code on test for ...
Mr Hery's user avatar
  • 860
-1 votes
3 answers
2k views

Visual C++ BinaryReader in Java

is there any method in java which would implement the same function as BinaryReader() in Visual C++
Chetan Gupta's user avatar
-1 votes
1 answer
3k views

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'\...
Gautham Santhosh's user avatar
-2 votes
2 answers
2k views

Create a File From Binary Data In C# [closed]

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) ...
Huzaifa's user avatar
  • 345