Changes

Jump to: navigation, search

Decorator

304 bytes added, 14:34, 1 March 2007
Example
}
public
class FileInputStream extends InputStream
{
public int read();
}
class FilterInputStream extends InputStream {
{
protected volatile InputStream in; public int read() { return in.read(); }
}
public
class PushbackInputStream extends FilterInputStream { public PushbackInputStream(InputStream in, int size) { super(in); if (size <= 0) { throw new IllegalArgumentException("size <= 0"); } this.buf = new byte[size]; this.pos = size; }
public int read(){
ensureOpen();
1
edit

Navigation menu