001 package org.apache.commons.ssl.asn1; 002 003 import java.io.InputStream; 004 005 abstract class LimitedInputStream 006 extends InputStream { 007 protected final InputStream _in; 008 009 LimitedInputStream( 010 InputStream in) { 011 this._in = in; 012 } 013 014 InputStream getUnderlyingStream() { 015 return _in; 016 } 017 018 protected void setParentEofDetect(boolean on) { 019 if (_in instanceof IndefiniteLengthInputStream) { 020 ((IndefiniteLengthInputStream) _in).setEofOn00(on); 021 } 022 } 023 }