Questions tagged [readblock]
10 questions
27
votes
5 answers
How can I tell when I've reached the end of the file when using the ReadBlock method in C#?
I noticed that it will keep returning the same read characters over and over, but I was wondering if there was a more elegant way.

abw333
- 5,571
- 12
- 41
- 48
15
votes
2 answers
When to use StreamReader.ReadBlock()?
I would like to know of a situation Read(char[],int,int) fails to return all chars requested while ReadBlock() returns all chars as expected (say when StreamReader works with an instance of a FileStream object).

RanC
- 233
- 1
- 2
- 9
3
votes
2 answers
I/O communication read and writing from client to server program
So I am playing around with the idea of ports and client/server communication.
I have a server.c program that can open a port, open a listening descriptor, and upon receiving a connection, fork a child to handle communication with a connecting…

JGc
- 31
- 3
2
votes
2 answers
StreamReader ReadBlock hangs on binary files
I've got a little class that accepts a POST from a browser that contains file uploads. I'm using a StreamReader to read it in. I read the header, then when I get to the body, I get the content length and make an array of that size and then…

Joel
- 16,474
- 17
- 72
- 93
2
votes
1 answer
ArgumentException while reading using readblock streamreader
I am trying to calculate row count from a large file based on presence of a certain character and would like to use StreamReader and ReadBlock - below is my code.
protected virtual long CalculateRowCount(FileStream inStream, int bufferSize)
…

kulNinja
- 526
- 6
- 14
2
votes
1 answer
Importing files with streamReader.ReadBlock (buffer)
Needed to import a large number of text files and find some research material, particularly for my problem, I decided to post the solution here. I believe it will help someone else.
My files are registries of 3,000,000 up. Tried to read line by…

Rodolfo Gaspar
- 88
- 2
- 8
0
votes
1 answer
Reading records from file of Pagesize only
I am a beginner and I have a file having variable sized records; there are two fields per row
i.e. one is 7-15 digits key and then followed by space there is a string which is also variable sized for each record.
I am trying to read bytes only of…

Basmah
- 829
- 3
- 13
- 25
0
votes
2 answers
Over TCP communication in C, how can you indicate to stop calling read() for a request without knowing any prior information about the data?
I am currently programming a server in C that communicates over sockets using TCP. The client is supposed to send {filename\n} + {file contents\n} and the server will store that information and then send a response on success. However, we can't be…

tps
- 1
0
votes
1 answer
Combine one Byte[] to Single Array
i do have an byte array included a range of numbers...
t Block and not the rest!
How can i have all block 4-8 in Temp[] ??

Alexandera MacQueen
- 99
- 2
- 11
-1
votes
1 answer
Wordpress - Plugin name?
when adblock working show look like picture
image
and when adblock doesn't work, show advertisement,
thank you!

user7688798
- 1
- 1