bpp
Class LazyFileOutputStream
java.lang.Object
java.io.OutputStream
bpp.LazyFileOutputStream
- public class LazyFileOutputStream
- extends java.io.OutputStream
Read the stream until a difference is noticed, then write the remainder.
This class acts like a FileOutputStream, but intead reads the file until a difference in what is written is noticed. If a change is noticed, the file is written from the first point of difference onward. If no change is noticed, then the file is only read.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LazyFileOutputStream
public LazyFileOutputStream(java.lang.String _fileName)
throws java.io.IOException
LazyFileOutputStream
public LazyFileOutputStream(java.io.File _file)
throws java.io.IOException
isDifferent
public boolean isDifferent()
isAbandoned
public boolean isAbandoned()
abandon
public void abandon()
throws java.io.IOException
- close without truncating the file to the current write position
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Throws:
java.io.IOException
flush
public void flush()
throws java.io.IOException
- Throws:
java.io.IOException
write
public void write(byte[] data,
int offset,
int length)
throws java.io.IOException
- Throws:
java.io.IOException
write
public void write(byte[] data)
throws java.io.IOException
- Throws:
java.io.IOException
write
public void write(int data)
throws java.io.IOException
- Throws:
java.io.IOException