public class ThumbnailService extends AbstractFileSystemService
FILES_PATH, PIXELS_PATH, ROOT_DEFAULT, THUMBNAILS_PATH
Constructor and Description |
---|
ThumbnailService(java.lang.String path)
Deprecated.
|
ThumbnailService(java.lang.String path,
boolean isReadOnlyRepo) |
Modifier and Type | Method and Description |
---|---|
void |
createThumbnail(ome.model.display.Thumbnail thumbnail,
byte[] buf)
Creates thumbnail on disk using byte array
|
byte[] |
getThumbnail(ome.model.display.Thumbnail thumbnail)
Return byte array of Thumbnail
|
byte[] |
getThumbnail(ome.model.display.Thumbnail thumbnail,
byte[] buf)
Return byte array of Thumbnail, providing byte array
|
boolean |
getThumbnailExists(ome.model.display.Thumbnail thumbnail)
Returns whether or not a thumbnail exists on disk.
|
long |
getThumbnailLength(ome.model.display.Thumbnail thumbnail)
Returns length of Thumbnail on disk
|
java.io.FileOutputStream |
getThumbnailOutputStream(ome.model.display.Thumbnail thumbnail)
Return FileOutputStream of Thumbnail
|
void |
removeThumbnails(java.util.List<java.lang.Long> thumbnailIds)
Removes files from data repository based on a parameterized List of Long
thumbnail ids
|
createSubpath, getFilesPath, getPixelsDirectory, getPixelsPath, getThumbnailPath
@Deprecated public ThumbnailService(java.lang.String path)
path
- public ThumbnailService(java.lang.String path, boolean isReadOnlyRepo)
public void createThumbnail(ome.model.display.Thumbnail thumbnail, byte[] buf) throws java.io.IOException
thumbnail
- buf
- java.io.IOException
public long getThumbnailLength(ome.model.display.Thumbnail thumbnail)
thumbnail
- public byte[] getThumbnail(ome.model.display.Thumbnail thumbnail) throws java.io.IOException
thumbnail
- java.io.IOException
public byte[] getThumbnail(ome.model.display.Thumbnail thumbnail, byte[] buf) throws java.io.IOException
thumbnail
- buf
- java.io.IOException
public java.io.FileOutputStream getThumbnailOutputStream(ome.model.display.Thumbnail thumbnail) throws java.io.IOException
thumbnail
- FileOutputStream
java.io.IOException
public boolean getThumbnailExists(ome.model.display.Thumbnail thumbnail) throws java.io.IOException
thumbnail
- The thumbnail metadata.java.io.IOException
public void removeThumbnails(java.util.List<java.lang.Long> thumbnailIds)
thumbnailIds
- -
Long file keys to be deletedome.conditions.ResourceError
- If deletion fails.