Package com.pixelmed.dicom
Class AsynchronousOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
com.pixelmed.dicom.AsynchronousOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
A class that extends FilterOutputStream by
creating a separate thread to actually perform the output operations, and returning
immediately from write calls, but blocking on closing.
-
Field Summary
Fields inherited from class java.io.FilterOutputStream
out -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes this output stream and releases any system resources associated with the stream.voidflush()Flushes this output stream and forces any buffered output bytes to be written out to the stream.voidwrite(byte[] b) Writesb.lengthbytes to this output stream.voidwrite(byte[] b, int off, int len) Writeslenbytes from the specified byte array starting at offsetoffto this output stream.voidwrite(int b) Writes the specifiedbyteto this output stream.Methods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
AsynchronousOutputStream
- Parameters:
out- theOutputStreamto write to
-
-
Method Details
-
write
Writeslenbytes from the specified byte array starting at offsetoffto this output stream.- Overrides:
writein classFilterOutputStream- Parameters:
b- the data.off- the start offset in the data.len- the number of bytes to write.- Throws:
IOException- if an I/O error occurs.
-
write
Writes the specifiedbyteto this output stream.- Overrides:
writein classFilterOutputStream- Parameters:
b- thebyte.- Throws:
IOException- if an I/O error occurs.
-
write
Writesb.lengthbytes to this output stream.- Overrides:
writein classFilterOutputStream- Parameters:
b- the data to be written.- Throws:
IOException- if an I/O error occurs.
-
flush
Flushes this output stream and forces any buffered output bytes to be written out to the stream.- Specified by:
flushin interfaceFlushable- Overrides:
flushin classFilterOutputStream- Throws:
IOException- if an I/O error occurs.
-
close
Closes this output stream and releases any system resources associated with the stream.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterOutputStream- Throws:
IOException- if an I/O error occurs.
-