public class MonitoredOutputStream extends ByteArrayOutputStream
NotifiableFileMonitorService.notifyChanged(String) method
is invoked when close() is called.
This is useful for ensuring the file monitoring system is notified of all changed files, even those which are changed very rapidly on disk and would not normally be detected using the file system's "last updated" timestamps.
buf, count| Constructor and Description |
|---|
MonitoredOutputStream(File file,
ManagedMessageRenderer managedMessageRenderer,
org.springframework.roo.file.monitor.NotifiableFileMonitorService fileMonitorService)
Constructs a
MonitoredOutputStream. |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
reset, size, toByteArray, toString, toString, toString, write, write, writeToflush, writepublic MonitoredOutputStream(File file, ManagedMessageRenderer managedMessageRenderer, org.springframework.roo.file.monitor.NotifiableFileMonitorService fileMonitorService) throws FileNotFoundException
MonitoredOutputStream.file - the file to output to (required)managedMessageRenderer - a rendered for outputting a message once
the output stream is closed (required)fileMonitorService - an optional monitoring service (null is
acceptable)FileNotFoundException - if the file cannot be foundpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class ByteArrayOutputStreamIOExceptionCopyright © 2009–2016. All rights reserved.