if (raf == null) {
throw new IllegalArgumentException("raf == null!");
}
this.raf = raf;
disposerRecord = new CloseableDisposerRecord(raf);
if (getClass() == FileImageOutputStream.class) {
disposerReferent = new Object();
Disposer.addRecord(disposerReferent, disposerRecord);
} else {
disposerReferent = new StreamFinalizer(this);