1 // Copyright 2000-2005 the Contributors, as shown in the revision logs.
2 // Licensed under the Apache Public Source License 2.0 ("the License").
3 // You may not use this file except in compliance with the License.
8 /** a generic interface for things that "know" their length */
9 public interface KnownLength {
11 public abstract int getLength();
13 public static class KnownLengthInputStream extends FilterInputStream implements KnownLength {
15 public int getLength() { return length; }
16 public KnownLengthInputStream(java.io.InputStream parent, int length) {