473,378 Members | 1,578 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,378 software developers and data experts.

How to convert FileStream to MemoryStream

ad
I do know how to convert a FileStream to MemoryStream.
Could somebody help me?
Aug 27 '06 #1
1 13628
ad wrote:
I do know how to convert a FileStream to MemoryStream.
Could somebody help me?
You cannot "convert" a FileStream into anything, let alone a MemoryStream.

What you could do, perhaps what you want to do, is read the entire contents
of a FileStream into a MemoryStream, or expose the entire contents of a file
through a MemoryStream.

If you could take a step back and describe the problem you're trying to
solve, someone can help.

-cd
Aug 27 '06 #2

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

Similar topics

7
by: Toby Mathews | last post by:
Hi, In an ASP.Net application I want to convert open create a FileStream object from a System.Drawing.Image - is this possible? I create an instance of an Image object using the FromFile method,...
0
by: Nicolas Guilhot | last post by:
Hi all ! I have a multi-page Tiff image file that I want to convert to PDF. To do so I am using iText library. The conversion is working, but the code execution is very different according to...
5
by: Chris Fink | last post by:
How do I load a string into a FileStream without going to disk? For example, string abc = "This is a string"; How do I load abc into a FileStream? FileStream input = new FileStream(.....);
3
by: sbparsons | last post by:
I have a file opened as a FileStream. I have a StreamReader and StreamWriter object opened, referencing the FileStream object. My aim is to read lines from the file until I find the line where...
3
by: Dennis | last post by:
I am trying to convert a bitmap to a JPEG MemoryStream and return a Byte array containing the resulting JPEG Image as follows: Public Function BmpToJPEG(ByVal BitMapIn As Bitmap, ByVal Quality As...
1
by: pgmfan | last post by:
What is the difference among filestream, memoryStream and byte stream, how do i use each properly. i confused by them appreciate for any advice ,please help
3
by: Ursula | last post by:
Is it possible to convert a string in a file. The problem is this: I have an object string that is a file xml and I want to pass to Deserialize function, but Deserialize function expect an object...
8
by: piggy | last post by:
I am trying to convert an image to an byte array (tobytes() method) and from byte array back to an image (frombytes() method). The problem i have here is say the image size is 285 bytes but the...
3
by: paradigmshift | last post by:
I am looking at how to move data from a file to a memory stream. This data will be needed many times over and over so i don't want to have to rely on the system to keep the information cashed for...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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...

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.