Class AbstractMedia

    • Constructor Detail

      • AbstractMedia

        public AbstractMedia()
      • AbstractMedia

        public AbstractMedia​(FileDocument other)
    • Method Detail

      • getWidth

        public long getWidth()
        Description copied from class: FileDocument
        Retrieve the width of the image represented by this filedoc.
        Reserved to images files.
        Overrides:
        getWidth in class FileDocument
        Returns:
        the width of the image or zero if it is not available.
      • getHeight

        public long getHeight()
        Description copied from class: FileDocument
        Retrieve the height of the image represented by this filedoc.
        Reserved to images files.
        Overrides:
        getHeight in class FileDocument
        Returns:
        the height of the image or zero if it is not available.
      • getDuration

        public long getDuration()
        Description copied from class: FileDocument
        Returns the duration of the audio (reserved for audio files)
        Overrides:
        getDuration in class FileDocument
        Returns:
        the duration of this audio file in millisecond (return -1 if this FileDocument is not an audio file).
        See Also:
        AudioUtil.getDuration(File)
      • getMediaWidth

        public abstract long getMediaWidth()
      • setMediaWidth

        public abstract void setMediaWidth​(java.lang.Long v)
      • getMediaHeight

        public abstract long getMediaHeight()
      • setMediaHeight

        public abstract void setMediaHeight​(java.lang.Long v)
      • getMediaDuration

        public abstract long getMediaDuration()
      • setMediaDuration

        public abstract void setMediaDuration​(java.lang.Long v)
      • performBeforeWrite

        protected void performBeforeWrite​(int op,
                                          Member mbr,
                                          java.util.Map context)
        Description copied from class: Data
        Called to perform some action before the write.
        Overrides:
        performBeforeWrite in class FileDocument
        Parameters:
        op - the operation (OP_CREATE, OP_UPDATE, ...)
        mbr - the member which requests the write operation
        context - a map which contains context parameters (may be null)