Hello list,šI'm trying to get Clack (http://clacklisp.org/) running on Google App Engine which means doing a Java Servlets back-end. Clack expects a :RAW-BODY request header that is an input stream, and the HTTPServletRequest object I receive from the Jetty web server inherits a getReader() method (for a character stream) and a getInputStream() method (for a binary stream).šLooking at the "reference implementation" (i.e. Hunchentoot), it creates a FLEXI-STREAM so that any HTTP "Content-Length" header can be used to set the bound on the stream. So based on that, and an IRC chat with Mark E., and some scratch code, I've come up with this to create a FLEXI-STREAM from the HTTPServletRequest:š(defconstant +latin-1+š (make-external-format :latin1 :eol-style :lf)š "A FLEXI-STREAMS external format used for `faithful' input andoutput of binary data (via hunchentoot/specials.lisp).")š(defun make-stream-for-request (req content-length)š "Construct a Lisp input flexi-stream from the binary stream providedby the HTTPServletRequest. Set the bound of the stream to the value ofthe Content-Length header, if any."š (let* ((java-stream (#"getInputStream" req))(lisp-stream (jss:new :|lisp.Stream|š š š (jss:get-java-field :|lisp.Symbol| "SYSTEM_STREAM") ; structureClassš š š java-streamš š š '(unsigned-byte 8)))) ; elementTypeš š (make-flexi-stream lisp-streamš š š :external-format +latin-1+š š š :bound content-length)))šWe agreed that there's not much documentation around this, hence this email.šCheers,šJohn :^P