Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Optimizing research on file type
Message
From
18/01/2016 15:06:11
 
 
To
14/01/2016 10:42:57
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01629800
Message ID:
01629897
Views:
53
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform