APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.sun.imageio.stream

public Class StreamCloser

extends Object
Class Inheritance
Imports
sun.awt.util.ThreadGroupUtils, java.io.IOException, java.util.Set, .WeakHashMap, javax.imageio.stream.ImageInputStream

This class provide means to properly close hanging image input/output streams on VM shutdown. This might be useful for proper cleanup such as removal of temporary files. Addition of stream do not prevent it from being garbage collected if no other references to it exists. Stream can be closed explicitly without removal from StreamCloser queue. Explicit removal from the queue only helps to save some memory.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private static Thread
private static WeakHashMap<StreamCloser.CloseAction, Object>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static void
public static StreamCloser.CloseAction
public static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

streamCloserback to summary
private static Thread streamCloser
toCloseQueueback to summary
private static WeakHashMap<StreamCloser.CloseAction, Object> toCloseQueue

Constructor Detail

StreamCloserback to summary
public StreamCloser()

Method Detail

addToQueueback to summary
public static void addToQueue(StreamCloser.CloseAction ca)
createCloseActionback to summary
public static StreamCloser.CloseAction createCloseAction(ImageInputStream iis)
removeFromQueueback to summary
public static void removeFromQueue(StreamCloser.CloseAction ca)
com.sun.imageio.stream back to summary

public final Class StreamCloser.CloseAction

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private ImageInputStream

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

iisback to summary
private ImageInputStream iis

Constructor Detail

CloseActionback to summary
private CloseAction(ImageInputStream iis)

Method Detail

performActionback to summary
public void performAction() throws IOException