Re: Parsing Multipart formdata



Hello Stephen,

I can get my code to do up to step 5 of your algorithm, which is to
readin in the headers eg: filename and contentType. After this, there
will be a \r and \n which consititue of 2 bytes.

Now, after reading this \r \n which seperate the part header and part
data, my stream position is now at the BEGINING of the binary stream or
base64 encoded stream as you mentioned.

And here is where I want to clarify something:

6. Start reading data into a string buffer.

So I can just have a string object then have buffer.readline ? And for
each of the line i compare it if it contains the boundary?

Is my data integrity will be broken, eg file corruption if i read the
stream in as string, then base64decode it, then convert it to bytes
array.

If reading the stream in doesnt break the data integrity, I think it
should be good because I can just read the wholething in with
stream.ReadToEnd(); then use regular expression or string.split to
split the multiparts to different part.

Kind regard,

.



Relevant Pages

  • Re: Huge images
    ... stream, decode the headers, read the sizes and close the stream ... managed to read GIF, PNG and BMP dimensions from headers, JPG seems to ... information by just reading not more than 100 bytes. ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Net Meter [radio station bit rate] tutorial please? I want to nail this????????
    ... whether the amount downloaded includes TCP/IP packet headers or not, ... downloaded would include TCP/IP packet headers. ... you said this about measuring the bit rate using NetMeter: ... pretty confident that the actual bit rate of the stream is 128 kbps ...
    (alt.radio.digital)
  • Re: troll is crossposting again..Re: More DEEP BREATHS...more BAD WORDS prob., DONT WORRY, NO SUICID
    ... when your reading in google click open the 'hide options' and it'll give ya ... the headers in compact form, and if you click "show original" it'll give ya ... > alt.hard.drugs think of somoene who posts peoples' home addresses. ...
    (alt.med.fibromyalgia)
  • Re: Reading Simple Flatfiles with a COBOL Mindset
    ... I am new to C and old to COBOL ... > in with respect to reading a simple file - one record at a time. ... stream and impose your interpretation on them: ... there are text streams and binary streams. ...
    (comp.lang.c)
  • Re: Reading from standard input
    ... I finally understood the concept of '-' stream. ... I am learning perl scripting and was reading an online tutorial where i ... Can somebody explain me why reading from the standard input ...
    (comp.lang.perl.misc)