Package net.officefloor.server.stream
Interface FileCompleteCallback
-
- All Known Implementing Classes:
HttpFileImpl
public interface FileCompleteCallbackInvokes on completion of writing theFileChannelcontent.- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcomplete(java.nio.channels.FileChannel file, boolean isWritten)Invoked on completion of writing theFileChannelcontent.
-
-
-
Method Detail
-
complete
void complete(java.nio.channels.FileChannel file, boolean isWritten) throws java.io.IOExceptionInvoked on completion of writing the
FileChannelcontent.Note that may also be invoked if content was not written (rather cancelled).
Typical use is to close the
FileChannelonce complete.WARNING: this is typically invoked on the
SocketChannelThreadso should not invoke any long running operations.- Parameters:
file-FileChannelfrom the write.isWritten-trueindicates whether written, whilefalseindicates cancelled.- Throws:
java.io.IOException- If issue in interacting withFileChannel.
-
-