Class Resource

    • Constructor Detail

      • Resource

        public Resource()
        Default constructor
      • Resource

        public Resource​(RepositoryData repositoryData)
        Constructor to use when reading the resource from the repository
        Parameters:
        repositoryData - the repository data containing the resource's data
    • Method Detail

      • getInputStream

        public InputStream getInputStream()
        Retrieve the resource's data If the data has already been read, the stream is reseted so it can be read again from the start
        Returns:
        the resource's data, or null if there is no data
      • getOutputStream

        public OutputStream getOutputStream()
        Retrieves an output stream that allows to modify the resource's data
        Returns:
        the output stream
      • getMimeType

        public String getMimeType()
        Retrieves the mime type of the resource's data
        Returns:
        the mime type of the resource's data
      • setMimeType

        public void setMimeType​(String mimeType)
        Sets the mime type of the resource's data
        Parameters:
        mimeType - the mime type to set
      • getEncoding

        public String getEncoding()
        Retrieves the encoding of the resource's data
        Returns:
        the encoding of the resource's data
      • setEncoding

        public void setEncoding​(String encoding)
        Sets the encoding of the resource's data
        Parameters:
        encoding - the encoding to set
      • getLastModificationDate

        public ZonedDateTime getLastModificationDate()
        Retrieves the last modification date of the resource's data
        Returns:
        the last modification date of the resource's data
      • setLastModificationDate

        public void setLastModificationDate​(ZonedDateTime lastModificationDate)
        Sets the last modification date of the resource's data
        Parameters:
        lastModificationDate - the last modification date to set