public class ThumbnailService extends AbstractFileSystemService
FILES_PATH, PIXELS_PATH, ROOT_DEFAULT, THUMBNAILS_PATH
Constructor and Description |
---|
ThumbnailService(String path)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
createThumbnail(Thumbnail thumbnail,
byte[] buf)
Creates thumbnail on disk using byte array
|
byte[] |
getThumbnail(Thumbnail thumbnail)
Return byte array of Thumbnail
|
byte[] |
getThumbnail(Thumbnail thumbnail,
byte[] buf)
Return byte array of Thumbnail, providing byte array
|
boolean |
getThumbnailExists(Thumbnail thumbnail)
Returns whether or not a thumbnail exists on disk.
|
long |
getThumbnailLength(Thumbnail thumbnail)
Returns length of Thumbnail on disk
|
FileOutputStream |
getThumbnailOutputStream(Thumbnail thumbnail)
Return FileOutputStream of Thumbnail
|
void |
removeThumbnails(List<Long> thumbnailIds)
Removes files from data repository based on a parameterized List of Long
thumbnail ids
|
createSubpath, getFilesPath, getPixelsPath, getThumbnailPath
public ThumbnailService(String path)
path
- public void createThumbnail(Thumbnail thumbnail, byte[] buf) throws IOException
thumbnail
- buf
- IOException
public long getThumbnailLength(Thumbnail thumbnail)
thumbnail
- public byte[] getThumbnail(Thumbnail thumbnail) throws IOException
thumbnail
- IOException
public byte[] getThumbnail(Thumbnail thumbnail, byte[] buf) throws IOException
thumbnail
- buf
- IOException
public FileOutputStream getThumbnailOutputStream(Thumbnail thumbnail) throws IOException
thumbnail
- FileOutputStream
IOException
public boolean getThumbnailExists(Thumbnail thumbnail) throws IOException
thumbnail
- The thumbnail metadata.IOException
public void removeThumbnails(List<Long> thumbnailIds)
thumbnailIds
- -
Long file keys to be deletedResourceError
- If deletion fails.
Version: 5.3.3-ice35-b63
Copyright © 2017 The University of Dundee & Open Microscopy Environment. All Rights Reserved.