473,386 Members | 1,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

read files in as literally bites

hi, ive been trying to figure out how i can get any type of file read in as
literally bytes. i tried using the binary reader, but if there was text at
all in the file, all i got was the text and the encoding for it. i want to
read all files in as there bit values...how can i do this?
--
-iwdu15
Feb 5 '06 #1
2 811
iwdu15 wrote:
hi, ive been trying to figure out how i can get any type of file read in as
literally bytes. i tried using the binary reader, but if there was text at
all in the file, all i got was the text and the encoding for it. i want to
read all files in as there bit values...how can i do this?


Use the StreamReader class. Use the ReadBlock & Read methods.

You'll probably need the Convert class as well.

Hope it helps.

Chris
Feb 5 '06 #2
"iwdu15" <jmmgoalsteratyahoodotcom> schrieb:
hi, ive been trying to figure out how i can get any type of file read in
as
literally bytes. i tried using the binary reader, but if there was text at
all in the file, all i got was the text and the encoding for it. i want to
read all files in as there bit values...


Take a look at the 'FileStream' class.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Feb 5 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Olivier Mandavy | last post by:
Hello, i'm looking for guidelines about what are the comments to be written at the beginning of source files. Thanks a lot. Olivier
18
by: JKop | last post by:
Here's what I know so far: You have a C++ project. You have source files in it. When you go to compile it, first thing the preprocessor sticks the header files into each source file. So now...
8
by: mark126 | last post by:
If this is not the right group for this question, please advise me of a better one. I have a collection of simple HTML files, many of which just contain a paragraph or two of text. Some contain...
2
by: Robizzle | last post by:
I'm working on a very simple script that logs the ip address, time of hit, and os/browser information and currently it works every time. The problem is getting the script included into my html...
5
by: Senger | last post by:
Hi. How I can Include or Extract bites in a binary file?? I'm tring to use a fopen method, but without success. Do you have any idea??? Thanks!!!
59
by: Alan Silver | last post by:
Hello, This is NOT a troll, it's a genuine question. Please read right through to see why. I have been using Vusual Basic and Classic ASP for some years, and have now started looking at...
2
by: Andrus | last post by:
I have resource files in different languages created by VCS 2005 Express. I want to use those files to translate reports at runtime. I have text to be translated as string. I think I need to...
0
by: G.Waleed Kavalec | last post by:
The nested option for WRITING XML is pretty clear. I have a problem trying to READ nested "tables".... <employer> <acct>1234</> </employees> <employee> <lastname>Smith</> <ssn>123456789</>...
3
by: sriram347 | last post by:
Hi I am a newbie to ASP.NET. I developed a web page (project type is web application) and I keep getting this error. B]Error message : "System.AccessViolation Exception attempted to read or...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.