Package ome.io.nio

Class ThumbnailService

    • Constructor Detail

      • ThumbnailService

        @Deprecated
        public ThumbnailService​(java.lang.String path)
        Deprecated.
        Constructor
        Parameters:
        path -
      • ThumbnailService

        public ThumbnailService​(java.lang.String path,
                                boolean isReadOnlyRepo)
    • Method Detail

      • createThumbnail

        public void createThumbnail​(ome.model.display.Thumbnail thumbnail,
                                    byte[] buf)
                             throws java.io.IOException
        Creates thumbnail on disk using byte array
        Parameters:
        thumbnail -
        buf -
        Throws:
        java.io.IOException
      • getThumbnailLength

        public long getThumbnailLength​(ome.model.display.Thumbnail thumbnail)
        Returns length of Thumbnail on disk
        Parameters:
        thumbnail -
      • getThumbnail

        public byte[] getThumbnail​(ome.model.display.Thumbnail thumbnail)
                            throws java.io.IOException
        Return byte array of Thumbnail
        Parameters:
        thumbnail -
        Returns:
        a byte array
        Throws:
        java.io.IOException
      • getThumbnail

        public byte[] getThumbnail​(ome.model.display.Thumbnail thumbnail,
                                   byte[] buf)
                            throws java.io.IOException
        Return byte array of Thumbnail, providing byte array
        Parameters:
        thumbnail -
        buf -
        Returns:
        a byte array
        Throws:
        java.io.IOException
      • getThumbnailOutputStream

        public java.io.FileOutputStream getThumbnailOutputStream​(ome.model.display.Thumbnail thumbnail)
                                                          throws java.io.IOException
        Return FileOutputStream of Thumbnail
        Parameters:
        thumbnail -
        Returns:
        a FileOutputStream
        Throws:
        java.io.IOException
      • getThumbnailExists

        public boolean getThumbnailExists​(ome.model.display.Thumbnail thumbnail)
                                   throws java.io.IOException
        Returns whether or not a thumbnail exists on disk.
        Parameters:
        thumbnail - The thumbnail metadata.
        Returns:
        See above.
        Throws:
        java.io.IOException
      • removeThumbnails

        public void removeThumbnails​(java.util.List<java.lang.Long> thumbnailIds)
        Removes files from data repository based on a parameterized List of Long thumbnail ids
        Parameters:
        thumbnailIds - - Long file keys to be deleted
        Throws:
        ome.conditions.ResourceError - If deletion fails.