You don't need to use a StreamReader for this; just use Stream.Read.
Greg Reinacker
Reinacker & Associates, Inc.
http://www.rassoc.com
http://www.rassoc.com/gregr/weblog/
-Original Message-
From: The DOTNET list will be retired 7/1/02
[mailto:[EMAIL PROTECTED]] On Behalf Of Jeff Roberts
Jeff Roberts [mailto:[EMAIL PROTECTED]] wrote:
> Thanks again ! I need to read a "binary" file into a byte
> array, can I do this = with the StreamReader class ? I don't
> see a BinaryStreamReader Class !
If it's binary, then you can read it by just using the Stream, which happens
to be a Netw
What about this:
WebClient wc = new WebClient();
byte[] pageData =
wc.DownloadData("http://www.someserver.com/mytestfile.txt";);
This has worked for me...
Seang
-Original Message-
From: Jeff Roberts [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 25, 2002 8:53 AM
To: [E
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] FileStream question
Thanks Tom. Does your book go into web deployment in detail ? Can you give
me a link to where I can buy it ?
Thanks again
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMento
Thanks Tom. Does your book go into web deployment in detail ? Can you give me a link
to where I can buy it ?
Thanks again
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
t: Re: [DOTNET] FileStream question
Yes I have and I tried it with your example and I get an exception when I
try to a BinaryReader.ReadByte() call !
That is why I asked if there was a BinaryStreamReader class .
thank you
You can read messages from the DOTNET archive, unsubscribe from DOTNE
Yes I have and I tried it with your example and I get an exception when I try to a
BinaryReader.ReadByte() call !
That is why I asked if there was a BinaryStreamReader class .
thank you
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor
Did you look at the BinaryReader class?
-Original Message-
From: The DOTNET list will be retired 7/1/02
[mailto:[EMAIL PROTECTED]]On Behalf Of Jeff Roberts
Sent: Tuesday, June 25, 2002 12:24 PM
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] FileStream question
Thanks again ! I need to
Thanks again ! I need to read a "binary" file into a byte array, can I do this with
the StreamReader class ? I don't see a BinaryStreamReader Class !
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
Jeff Roberts [mailto:[EMAIL PROTECTED]] wrote:
> Does anyone know if I can read a text file from a web server
> with the = FileStream class ? For example, if my .net
> application was launched from = www.ws.com\myapp.exe, could I
> read a file from www.ws.com by the name of = mytextfile with
> t
Here is an exapmle from my File Streaming chapter in Inside C# (second
edition).
using System;
using System.IO;
using System.Net;
namespace WebPages
{
public class WebPagesApp
{
[STAThread]
public static void Main(string[] args)
{
string s = "http://w
11 matches
Mail list logo