1 // Copyright (C) 2003 Adam Megacz <adam@ibex.org> all rights reserved.
3 // You may modify, copy, and redistribute this code under the terms of
4 // the GNU Library Public License version 2.1, with the exception of
5 // the portion of clause 6a after the semicolon (aka the "obnoxious
11 /** a generic interface for things that "know" their length */
12 public interface KnownLength {
14 public abstract int getLength();
16 public static class KnownLengthInputStream extends FilterInputStream implements KnownLength {
18 public int getLength() { return length; }
19 public KnownLengthInputStream(java.io.InputStream parent, int length) {