org.apache.excalibur.source.impl
Class FileSource.FileSourceOutputStream
java.lang.Object
java.io.OutputStream
java.io.FileOutputStream
org.apache.excalibur.source.impl.FileSource.FileSourceOutputStream
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable
- Enclosing class:
- FileSource
private static class FileSource.FileSourceOutputStream
- extends java.io.FileOutputStream
A file outputStream that will rename the temp file to the destination file upon close()
and discard the temp file upon cancel().
Methods inherited from class java.io.FileOutputStream |
getChannel, getFD, write, write, write |
Methods inherited from class java.io.OutputStream |
flush |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_tmpFile
private java.io.File m_tmpFile
m_isClosed
private boolean m_isClosed
m_source
private FileSource m_source
FileSource.FileSourceOutputStream
public FileSource.FileSourceOutputStream(java.io.File tmpFile,
FileSource source)
throws java.io.IOException
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class java.io.FileOutputStream
- Throws:
java.io.IOException
canCancel
public boolean canCancel()
cancel
public void cancel()
throws java.lang.Exception
- Throws:
java.lang.Exception
finalize
public void finalize()
- Overrides:
finalize
in class java.io.FileOutputStream
getSource
public FileSource getSource()