Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 94673 invoked from network); 2 Mar 2005 14:41:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 2 Mar 2005 14:41:38 -0000 Received: (qmail 29090 invoked by uid 500); 2 Mar 2005 14:41:35 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 29014 invoked by uid 500); 2 Mar 2005 14:41:35 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 28994 invoked by uid 99); 2 Mar 2005 14:41:34 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from Unknown (HELO server.bizzdesign.nl) (80.89.226.18) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 02 Mar 2005 06:41:33 -0800 Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: AbstractResourceReader? X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 Date: Wed, 2 Mar 2005 15:38:33 +0100 Message-ID: <5E091A68F794974CAF431CA31F5AF2CC11EA0A@server.bizzdesign.nl> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: AbstractResourceReader? thread-index: AcUfNYJtVaILcDwXQY6fIryYnXCLbQ== From: "Bart Molenkamp" To: X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi, A while ago I was discussing how to build a reader that could get it's input stream from the context object using JXPath. It gets the following information from the context object using configurable Xpath expressions: - the content stream - the mime type - the content length I've created the reader by simply copying the existing ResourceReader and replaced all the code where a Source was used to use the content input stream, the content length and the content type that are passed in the context object. The reader is working this way, but I was wondering if it makes sense to create another abstract reader that handles things that are common to the ReasourceReader and the StreamReader (the reader I've created). It concers many HTTP specific code such as byte range, content expiration, etc. I've used all that code (only difference is that my reader isn't cacheable, don't know how to generate a key yet). Can someone tell me what code would be common (as I don't have specific knowledge about these http byte range, expiration etc things), or if it doesn't make sense at all. Bart.