[antlr-interest] Parse only <n> bytes from InputStream
aharth at gmx.de
Tue Jul 6 07:33:05 PDT 2004
I have written a small HTTP server in Java and like to parse input
from a HTTP PUT operation. The length of the input in bytes is
specified using the content-length header. I am able to parse the
stream that's coming in. So far, so good.
Problem is that the parser should close the Reader after a number of
bytes (the content-length) have been read. I could first store
everything the HTTP server recieves, and then parse that, but since I
want to process megabytes (and maybe gigabytes) caching things is not
really an option. I cannot specify and end of file symbol either
because that's not in the HTTP protocol.
Is there a way to make the parser stop after having read a given
number of bytes?
Yahoo! Groups Links
<*> To visit your group on the web, go to:
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
More information about the antlr-interest