Skip to main content

All Questions

Tagged with
1 vote
1 answer
134 views

Using Stax2 to escape special characters in Scala

I am trying to use Stax2 in order to write xml files with escaping special characters for the attributes. When I am trying to achieve is an exact output like this: <elem1 att1="This &#x0A; ...
Usr654789's user avatar
-1 votes
2 answers
3k views

Write large data into MemoryStream with C# [duplicate]

I have a big stream (4Go), I need to replace some character (I need to replace one specific character with 2 or 3 ones) in that stream, i get the stream from à service à.d I have to return back a ...
Khaled's user avatar
  • 317
-2 votes
1 answer
213 views

Write to File skips last 10-20 lines [duplicate]

First i Read all lines of a text file line by line and store it in a string-array. Then i write it with file.WriteLine() into a file. The opened Console window shows every line which was written into ...
Phil's user avatar
  • 19
-1 votes
2 answers
148 views

Read the flat file,group and write to file(Add special Characters as '*' in Empty Space)

E2739158012008-10-01O9918107NPF7547379999010012008-10-0100125000000 ...
sivaraman vasu's user avatar
0 votes
2 answers
1k views

Replace value & save file during reading CSV file (C#)

I'm reading csv file: string line; StreamReader sr = new StreamReader(file.ToString()); while ((line = sr.ReadLine()) != null) { string col1 = line.Split(',')[10]; //old value col1 = "my ...
4est's user avatar
  • 3,118
0 votes
0 answers
101 views

Using StreamWriter not writable

I have the below subclass for writing a string to a text file in my application: async void Confirm(object sender, EventArgs e) { using (var stream = await FileSystem.OpenAppPackageFileAsync("...
WSC's user avatar
  • 978
2 votes
2 answers
4k views

C# streamreader and streamwriter onto same file

How do I read and write onto the same file? A sample of my code looks like this: List<string> Data = new List<string>(); StreamReader sr = new StreamReader(@"C:\Users\manda\Desktop\...
Sydroce1's user avatar
-2 votes
1 answer
196 views

Streamwriter missing async versions to write numbers?

A FileStream buffers the bytes it needs to write. If the buffer is full, all bytes are written (flushed) to the file. This write process might take some time. As every byte being added to the ...
Harald Coppoolse's user avatar
1 vote
1 answer
2k views

Return stream immediately and then write to stream asynchronously

In my current code I have a method like this to read data from a device (pseudo code): public async Task<string> ReadAllDataFromDevice() { var buffer = ""; using (var device = new ...
Robert Hegner's user avatar
2 votes
2 answers
1k views

How to prevent Newtonsoft JsonSerializer to close the stream?

So I haven't written the code I'm dealing right now and I'm looking how to best handle this. Right now I have this. public static void WriteSymbol(Stream stream, Symbol symbol) { using (var ...
ditoslav's user avatar
  • 4,802
0 votes
1 answer
1k views

How to quickly write large amounts of data into txt files

Recently I was trying to write pointcloud data to .txt file by using C++ in Visual Studio 2010. At the beginning I used ostream to output the data, but I found it slow when writing the data. My code :...
Durden's user avatar
  • 1
1 vote
1 answer
2k views

Unable to create and send dynamic CSV file as attachment over mail

I am trying to create and send dynamic csv file as attachment over mail, but it is not working. I am able to send mail with attachement, but file is going as empty. Below is my code: var ...
Sachin's user avatar
  • 531
0 votes
1 answer
1k views

NodeJS Stream splitting

I have an infinite data stream from a forked process. I want this stream to be processed by a module and sometimes I want to duplicate the data from this stream to be processed by a different module (...
Andras's user avatar
  • 693
2 votes
2 answers
1k views

How to close a stream properly?

I have been assigned a task to write a program that will: Open a file. Read the content. Replace a specific word with another word. Save the changes to the file. I know for sure that my code can ...
Average_guy's user avatar
1 vote
2 answers
81 views

Can't Use Stream.Write method while playing same file in MediaElement

So lets say I have a file which has around 2MB already downloaded and written which is being played using a MediaElement. So while the media is being played, I want to download and write the rest of ...
Dinindu Perera's user avatar

15 30 50 per page