You must implement
public abstract void write(int b) throws IOException
Expected semantics:
b is an int between 0 and 255
If b is not between 0 and 255, then the three high order bytes of the int are thrown away.
You may override other methods for performance.
package com.macfaq.io;
import java.io.*;
public class NullOutputStream extends OutputStream {
public void write(int b) {
}
public void write(byte[] data) {
}
public void write(byte[] data, int offset, int length) {
}
}