Code example for FileBackedOutputStream

Methods: write

0
 
	@Override 
	public int read() throws IOException {
		int r = super.read();
		if(r != -1) {
			backer.write(r);
		} 
		return r;
	} 
 
	@Override 
	public int read(byte[] b) throws IOException {
		return read(b,0,b.length);
	} 
 
	@Override 
	public synchronized void reset() throws IOException {
		throw new UnsupportedOperationException("no reset!");
	} 
} 
Experience pair programming with AI  Get Codota for Java