Questions tagged [filestreams]

35 questions
1
vote
1 answer

java : Is it a bad practice to store file streams in a database?

I'm reading a file streams of certain group of files and storing it in a database as bytea type. But when I try to read the streams from the database and write those streams into a file, It is really taking long to do it and finally I get an out of…
Aravind S
  • 463
  • 2
  • 9
  • 25
1
vote
2 answers

Reading data from a text file with different variable types in C/C++

I'm building a simple family tree using classes, where each person has an ID and can have one or more relationships, and each relationship also has an ID. I'm trying to import this file in order to be able to use the class methods to import a…
Paulo Maia
  • 63
  • 4
1
vote
1 answer

Cutoff appears in output mp3 from request.pipe function, while making request to AVS api

I have developed nodejs-client that replaces Javaclient provided with AVS (Alexa Voice Service) sample code. The code used makes a post request, and pipes the output mp3 to file. But many a times output mp3 is not complete and its broken from the…
1
vote
2 answers

WCF service is receiving null value from client

I wrote a service that implements functions performing video process. From the client (console project), I call a function of the service, using the client service reference, and send as parameter to the function a FileStream (I verified that indeed…
1
vote
1 answer

Forking Streams in java

First off, I did do my research and completely understand that java explicitly says this should not be done. referencing this question here Can you split a stream into two streams? that out of the way, im building an application where i would like…
Valerie Thiesent
  • 891
  • 1
  • 8
  • 17
1
vote
2 answers

What is the equivalent 'streams' code of TStringList.SaveToFile and which is better for large amounts of data?

The following console application utilises TStringList.SaveToFile to write multiples lines to a text file: program Project1; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils, System.Classes; var i: Integer; a,b,c: Single; myString :…
Trojanian
  • 692
  • 2
  • 9
  • 25
0
votes
2 answers

reading string from textfile resources

I have added 3 text file resources to an app and am trying to read from them but I just can't seem to hack it. I've tried using a filestream and have just tried using ResourceReader and I've tried a combination of the 2 but no luck , any ideas on…
Dani
  • 2,480
  • 3
  • 21
  • 27
0
votes
1 answer

Pharo Smalltalk image unresponsive with FileStream on Windows 10

I'm using a Pharo 6.1 image to do some CSV file processing. Sometimes my image just becomes unresponsive — I have to terminate the Pharo VM from Task Manager. Is it necessary to use somethings like: ensure:[toStream close] ensure:[fromStream…
Petr
  • 23
  • 1
  • 6
0
votes
4 answers

Reading only float values from text file

I have a data file which is text format. It has 2 coloums first one is not useful that I could ignore it and second one is that what I need. The coloum has a different values on each row as string, float etc. For some calculation I need to only…
agenel
  • 155
  • 1
  • 4
  • 13
0
votes
2 answers

Unable to transfer large size file using request module in Node.js

In a Node.js project I have to transfer file from computer to server. I can send file if file size is small i.e. 2mb but unable to send file if it is more than this size. Here is my code as follows: var url1 =…
Deep Kakkar
  • 5,831
  • 4
  • 39
  • 75
0
votes
1 answer

Bitmap curropts after being loaded and saved

I loaded a 24-bit uncompressed Bitmap into a 2D array of R,G,B unsigned chars, and then saved it again, I use file streams in binary modes to ensure no auto formatting occur, and the header is exported just as imported as whole...Padding is not…
Virtuoso
  • 27
  • 5
0
votes
0 answers

How to create new file in java from blob with faster speed

I have byte array of file in database. I am creating java file from it. But it is consuming more time. Is there any way to create file faster than it. My attempts are as follows >>> Blob blob = null while (rs.next()) { …
Sumon Bappi
  • 1,937
  • 8
  • 38
  • 82
0
votes
1 answer

WCF and streaming files

I have a WCF service that streams files with the following method: public class GetFileService : IGetFileService { public GetFileResponse GetFile(GetFileRequest request) { var fileStream = new FileStream(request.FileName,…
Jihad Haddad
  • 592
  • 1
  • 6
  • 19
0
votes
1 answer

unable to use std::getline() to work alongside ifstream and ofstream

If I split the code into two separate programs it works like I want it to (separating3 part#1 where I create the file, and part #2 where I try to access the file as a user); but as soon as I put the code into a single program (see below), I am…
Mike
  • 371
  • 1
  • 4
  • 18
0
votes
2 answers

Writing to a file duplicates the last entry

I think this is the only lines of code needed. The program reads from a text file, separates the information out and rewrites it to two different files. It "correctly" reads all the values, and separates it appropriately. the issue I am having, is…