OutputStream的close为空方法

如例子

io 某些类 可以不必关闭 close_javase


贴源码

public
class DataOutputStream extends FilterOutputStream implements DataOutput {
}




public
class FilterOutputStream extends OutputStream {
    /**
     * The underlying output stream to be filtered.
     */
    protected OutputStream out;
    public void close() throws IOException {
        try {
          flush();
        } catch (IOException ignored) {
        }
        out.close();
    }
}



public abstract class OutputStream implements Closeable, Flushable {
    public void close() throws IOException {
    }

}




InputStream close()空方法