TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Raghavendra Joshi
NA
44
46.9k
FileStream and stream object
Apr 28 2015 4:14 AM
I want to write the contents of one docx file to another using "FILESTREAM AND STREAM" OBJECT
Here is my code
HttpWebResponse r = (HttpWebResponse)w.GetResponse();
Stream objStream = r.GetResponseStream();
using
(
FileStream
objStr =
new
FileStream
(
@"E:\downloads\test.docx"
,
FileMode
.Create))
{
Stream
str = r.GetResponseStream();
if
(str !=
null
)
{
byte
[] read =
new
byte
[256];
long
count = str.Read(read, 0, 256);
while
(count > 0)
{
objStr.Write(read, 0,
Convert
.ToInt32(count));
count = str.Read(read, 0, 256);
}
}
str.close();
}
Reply
Answers (
3
)
PrintSystemJobInfo
Schema returned by the query differs from the base query