Skip to main content

Temporary Files in c:\user\*\AppData\Local\Temp

2 replies [Last post]
tigger2010
Offline
Joined: 2010-03-25
Points: 0

Hi,

I had the problem that when loading a jpeg-Image I got a decoder error. I found out that the Problem was that I had no disc space left on c:\. When searching for the files clogging up c:\ I found 900 MB of temporary files in c:\user\*\AppData\Local\Temp with a name like imageio[...].tmp. They where dating back quit some time. Im now wondering what these files are for (they containing JPEG-Image data) and who is responsible for deleting them. Since AppDate is a hidden directory the user normaly won't see this files and is just wondering where his disc space has gone.

Yours,

Andreas

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Harald Kuhr

Hi,

On 25. mars 2010, at 14.52, jai-imageio@javadesktop.org wrote:

> I had the problem that when loading a jpeg-Image I got a decoder error. I found out that the Problem was that I had no disc space left on c:\. When searching for the files clogging up c:\ I found 900 MB of temporary files in c:\user\*\AppData\Local\Temp with a name like imageio[...].tmp. They where dating back quit some time. Im now wondering what these files are for (they containing JPEG-Image data) and who is responsible for deleting them. Since AppDate is a hidden directory the user normaly won't see this files and is just wondering where his disc space has gone.

I believe this is a general "problem" with ImageIO, as disk caching is used by default when creating ImageInputStreams. I believe the temp files are created with deleteOnExit(), but of course there's no guarantee that the JVM will actually delete the file.

There are, however, various ways to disable the disk caching:

Either by disable it in general:
http://java.sun.com/javase/6/docs/api/javax/imageio/ImageIO.html#setUseC...

...or, create your own instances of in-memory streams when reading:
http://java.sun.com/javase/6/docs/api/javax/imageio/stream/MemoryCacheIm...

Or if that does fit your needs, you could roll your own streams, possibly using the various stream provider Spis, that explicilty deletes the temp files when done.

Best regards,

--
Harald K

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@jai-imageio.dev.java.net
For additional commands, e-mail: interest-help@jai-imageio.dev.java.net

Ken Warner

I told everybody about this problem years ago.

Just something else the genius' at SUN chose to
ignore.

I hope they are all happy at their new jobs.....

jai-imageio@javadesktop.org wrote:
> Hi,
>
> I had the problem that when loading a jpeg-Image I got a decoder error. I found out that the Problem was that I had no disc space left on c:\. When searching for the files clogging up c:\ I found 900 MB of temporary files in c:\user\*\AppData\Local\Temp with a name like imageio[...].tmp. They where dating back quit some time. Im now wondering what these files are for (they containing JPEG-Image data) and who is responsible for deleting them. Since AppDate is a hidden directory the user normaly won't see this files and is just wondering where his disc space has gone.
>
> Yours,
>
> Andreas
> [Message sent by forum member 'tigger2010']
>
> http://forums.java.net/jive/thread.jspa?messageID=393718
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@jai-imageio.dev.java.net
> For additional commands, e-mail: interest-help@jai-imageio.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@jai-imageio.dev.java.net
For additional commands, e-mail: interest-help@jai-imageio.dev.java.net