Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Optimizing research on file type
Message
De
18/01/2016 15:06:11
 
 
À
14/01/2016 10:42:57
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01629800
Message ID:
01629897
Vues:
54
>I take it that you unzip the zip file and put the files it contains in a folder somewhere
>
>To determine the file type of a file ( apart from looking at the extension) I do not think it is wise to put the contents in a string
>
>I think you have to process the 'raw' contents of the file
>
>Do not use a StreamReader which decodes the bytes into chars depending on an encoding
>
> but a FileStream instead ( https://msdn.microsoft.com/en-us/library/tyhc0kft(v=vs.110).aspx )
>
>You can either
> - read all the bytes in a byte array
>- or use Seek() and read the parts you are interested in with Read() or ReadByte()

Thanks, I will take a look at this by the end of the month.
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
Répondre
Fil
Voir

Click here to load this message in the networking platform