Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stream does not return the same amount of bytes
Message
De
13/02/2013 15:46:11
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01565895
Message ID:
01565954
Vues:
43
>I'd switch to using a BinaryReader if it's not a text file. Not quite as easy to use, but not too bad either. Just create a small array as a buffer and run a loop to fill it/write it out until it's complete.

Well, I've used this approach so far for encoding a file to Base64 and things like that. The process is really simple. There is a file on disk. I want to get a hold of it, stream it into a StreamWriter and write it back on disk. This should give me the same amount of bytes and the same file after. That works at 99.99%. But, in a very rare case, it is not. Before rewriting everything, I would like to make sure there is really a problem that I cannot control. I am still looking at the code to see if I missed something.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform