⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 delayedinputstream.java

📁 很棒的web服务器源代码
💻 JAVA
字号:
// DelayedInputStream.java// $Id: DelayedInputStream.java,v 1.5 2000/08/16 21:37:46 ylafon Exp $// (c) COPYRIGHT MIT and INRIA, 1996.// Please first read the full copyright statement in file COPYRIGHT.htmlpackage org.w3c.jigsaw.ssi ;import java.io.IOException;import java.io.InputStream;/** * Used to delay the (perhaps expensive) creation of a real stream * until the first access.  * @author Antonio Ramirez <anto@mit.edu> */public abstract class DelayedInputStream extends InputStream{    /**     * The InputStream that data will be really read from.     */    protected InputStream in = null ;    /**     * This method is called on the first access to the stream.     * (<em>Not</em> at construction time.) Should initialize     * <code>in</code> as a valid stream. Must <em>not</em> make it     * <strong>null</strong>.     */    protected abstract void init() ;    public final void close()	throws IOException    {	if(in!=null) in.close() ;    }    public final int read()	throws IOException     {	if(in == null) init() ;	return in.read() ;    }    public final int read(byte b[], int off, int len)	throws IOException     {	if(in == null) init() ;	return in.read(b,off,len) ;    }    public final int read(byte b[])	throws IOException    {	if(in == null) init() ;	return in.read(b) ;    }    public final void reset()	throws IOException    {	if(in == null) init() ;	in.reset() ;    }    public final void mark(int readlimit)    {	if(in == null) init() ;	in.mark(readlimit) ;    }    public final boolean markSupported()    {	if(in == null) init() ;	return in.markSupported() ;    }    public final long skip(long n)	throws IOException    {	if(in == null) init() ;	return in.skip(n) ;    }    public final int available()	throws IOException    {	if (in == null) init();	return in.available();    }}    

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -