Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0B2AA1079D for ; Tue, 28 Jan 2014 21:18:16 +0000 (UTC) Received: (qmail 10614 invoked by uid 500); 28 Jan 2014 21:18:12 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 10508 invoked by uid 500); 28 Jan 2014 21:18:12 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 10500 invoked by uid 99); 28 Jan 2014 21:18:12 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jan 2014 21:18:12 +0000 Received: from localhost (HELO mail-wg0-f49.google.com) (127.0.0.1) (smtp-auth username djones, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jan 2014 21:18:12 +0000 Received: by mail-wg0-f49.google.com with SMTP id a1so1936947wgh.16 for ; Tue, 28 Jan 2014 13:18:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=qnJagmAP4qdVJwNw5OoIbXLOxpgESMQk6lfzcYeXT6g=; b=NgNW1MEbxTO1HT9urK7hpkL0j2wUs83CW24z2Bh81DeOtjup/N/2r4/7P51+ffnKBI 0ktclR7WqYa690+bK0aueqkLwUIYVISPEKwWVKQOf++7zvcOQk5VJTUGNXsGIHntff99 7OrdaVkD0XhpqjWLmbYCLwIUmoqjaDSiyf1AaaQqOUXJiSwDWBlkh//jtJa72loEU5or hzFDcjUCGkz43X2ntRMiWi4CoR+zte4J2heYQxXrF/Z8/5Ob5Bu0IBvmZZvFThekAm5c LVLh2RoKj9xmF9XPVN/kyFKu+geqvps1NPCOLv6ov12dEUVEzTpPFsAaaPOlCJFE6x8H vEVg== X-Gm-Message-State: ALoCoQkuNWXB0e/ZgNSKsIPT97r7iwDaC19A6Z+8G1z+Be5yH/lWltBSS8qHCW+5R5RIAHOdvweC MIME-Version: 1.0 X-Received: by 10.180.19.65 with SMTP id c1mr10356515wie.39.1390943890629; Tue, 28 Jan 2014 13:18:10 -0800 (PST) Received: by 10.227.138.129 with HTTP; Tue, 28 Jan 2014 13:18:10 -0800 (PST) X-Originating-IP: [86.30.112.39] Date: Tue, 28 Jan 2014 21:18:10 +0000 Message-ID: Subject: [io] Addition of a TrailerInputStream class? From: Duncan Jones To: Commons Developers List Content-Type: text/plain; charset=ISO-8859-1 Hi all, For a project of mine I developed a class named TrailerInputStream, which reads from an InputStream whilst retaining a buffer of N bytes (the trailer), Once the stream has been exhausted, the final N bytes are obtained by calling the getTrailer() method. I found it helpful for reading structured data in which the main contents of the stream are processed differently to the trailer at the end. Is there a place for something like this in IO? I can imagine a symmetric class called HeaderInputStream as well. Current code is at https://github.com/RNCryptor/JNCryptor/blob/streaming/src/main/java/org/cryptonode/jncryptor/TrailerInputStream.java. It's not yet in a fit state for submission, but isn't far away in terms of comment quality and unit tests. Kind regards, Duncan --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org