All Questions
Tagged with streamwriter stream
43
questions
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 
 ...
-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 ...
-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 ...
-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 ...
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 ...
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("...
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\...
-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 ...
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 ...
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 ...
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 :...
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 ...
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 (...
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 ...
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 ...