Code example for FileBackedOutputStream

Methods: write

0
 
	@Override 
	public int read(byte[] b, int off, int len) throws IOException {
		int amt = super.read(b, off, len);
		if(amt != -1) {
			backer.write(b,off,amt);
		} 
		return amt;
	} 
 
	@Override 
	public int read() throws IOException {
		int r = super.read();
		if(r != -1) {
			backer.write(r);
		} 
		return r;
	} 
 
	@Override