Package org.ametys.core.util.path
Class PathSource.PathSourceOutputStream
- java.lang.Object
 - 
- java.io.OutputStream
 - 
- org.ametys.core.util.path.PathSource.PathSourceOutputStream
 
 
 
- 
- All Implemented Interfaces:
 Closeable,Flushable,AutoCloseable
- Enclosing class:
 - PathSource
 
private static class PathSource.PathSourceOutputStream extends OutputStream
A file outputStream that will rename the temp file to the destination file upon close() and discard the temp file upon cancel(). 
- 
- 
Field Summary
Fields Modifier and Type Field Description private boolean_isClosedprivate OutputStream_osprivate PathSource_sourceprivate Path_tmpFile 
- 
Constructor Summary
Constructors Constructor Description PathSourceOutputStream(Path tmpFile, PathSource source) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanCancel()voidcancel()voidclose()voidfinalize()voidflush()PathSourcegetSource()voidwrite(int b)- 
Methods inherited from class java.io.OutputStream
nullOutputStream, write, write 
 - 
 
 - 
 
- 
- 
Field Detail
- 
_os
private OutputStream _os
 
- 
_isClosed
private boolean _isClosed
 
- 
_source
private PathSource _source
 
 - 
 
- 
Constructor Detail
- 
PathSourceOutputStream
public PathSourceOutputStream(Path tmpFile, PathSource source) throws IOException
- Throws:
 IOException
 
 - 
 
- 
Method Detail
- 
write
public void write(int b) throws IOException
- Specified by:
 writein classOutputStream- Throws:
 IOException
 
- 
flush
public void flush() throws IOException
- Specified by:
 flushin interfaceFlushable- Overrides:
 flushin classOutputStream- Throws:
 IOException
 
- 
close
public void close() throws IOException
- Specified by:
 closein interfaceAutoCloseable- Specified by:
 closein interfaceCloseable- Overrides:
 closein classOutputStream- Throws:
 IOException
 
- 
canCancel
public boolean canCancel()
 
- 
getSource
public PathSource getSource()
 
 - 
 
 -