to.etc.domui.caches
Class FileImageReference
java.lang.Object
to.etc.domui.caches.FileImageReference
- All Implemented Interfaces:
- java.io.Closeable, IImageReference
public class FileImageReference
- extends java.lang.Object
- implements IImageReference
Method Summary |
void |
close()
|
java.io.InputStream |
getInputStream()
Returns the datastream containing this image. |
java.lang.String |
getMimeType()
This must return the image's actual mime type. |
long |
getVersionLong()
If this retriever accesses resources that can change after use this must return some usable
indication of the version, usually a "last date changed" timestamp. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileImageReference
public FileImageReference(java.io.File source,
java.lang.String mime)
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Specified by:
close
in interface IImageReference
- Throws:
java.io.IOException
getInputStream
public java.io.InputStream getInputStream()
throws java.lang.Exception
- Description copied from interface:
IImageReference
- Returns the datastream containing this image. This may be called only ONCE for an image and must
be closed after use.
- Specified by:
getInputStream
in interface IImageReference
- Returns:
-
- Throws:
java.lang.Exception
getMimeType
public java.lang.String getMimeType()
throws java.lang.Exception
- Description copied from interface:
IImageReference
- This must return the image's actual mime type.
- Specified by:
getMimeType
in interface IImageReference
- Returns:
-
- Throws:
java.lang.Exception
getVersionLong
public long getVersionLong()
throws java.lang.Exception
- Description copied from interface:
IImageReference
- If this retriever accesses resources that can change after use this must return some usable
indication of the version, usually a "last date changed" timestamp. This value should remain
unchanged over invocations if the object accessed has not changed. It should return -1 if
the source object has been deleted; it should return 0 if the timestamp does not matter.
This gets called multiple times; it should be fast.
- Specified by:
getVersionLong
in interface IImageReference
- Returns:
-
- Throws:
java.lang.Exception