Code example for PrintStream

Methods: write

0
		PrintStream out = checkAccess();
 
		if (out == this) {
			super.write(buf, off, len);
		} else { 
			out.write(buf, off, len);
		} 
	} 
 
	@Override 
	public final void write(int b) {
		PrintStream out = checkAccess();
 
		if (out == this) {
			super.write(b);
		} else { 
			out.write(b);
		} 
	} 
 
	private PrintStream checkAccess() {