01: package org.bouncycastle.asn1;
02:
03: import java.io.InputStream;
04:
05: abstract class LimitedInputStream extends InputStream {
06: protected final InputStream _in;
07:
08: LimitedInputStream(InputStream in) {
09: this ._in = in;
10: }
11:
12: InputStream getUnderlyingStream() {
13: return _in;
14: }
15:
16: protected void setParentEofDetect(boolean on) {
17: if (_in instanceof IndefiniteLengthInputStream) {
18: ((IndefiniteLengthInputStream) _in).setEofOn00(on);
19: }
20: }
21: }
|