Class HintArtifact

    • Constructor Detail

      • HintArtifact

        public HintArtifact​(String name)
        Constructs a new directory type artifact with the given repository name.
        Parameters:
        name - the repository name for this artifact.
      • HintArtifact

        public HintArtifact​(String name,
                            String extension)
        Constructs a new directory type artifact with the given repository name and extension
        Parameters:
        name - the repository name for this artifact.
        extension - the extension for this artifact
    • Method Detail

      • getSerializationType

        public SerializationType getSerializationType()
        Returns the serialization type of this artifact.
        Specified by:
        getSerializationType in interface Artifact
        Returns:
        the serialization type of this artifact.
      • spool

        public void spool​(OutputStream out)
                   throws IOException,
                          RepositoryException
        Writes the content to the given output stream and closes it afterwards. This is the preferred method to use for output-artifacts.

        The specified stream remains open after this method returns.

        Specified by:
        spool in interface Artifact
        Overrides:
        spool in class org.apache.jackrabbit.vault.fs.impl.AbstractArtifact
        Parameters:
        out - the output stream to spool to
        Throws:
        IOException - if an I/O error occurs
        RepositoryException - if a repository error occurs
      • getContentLength

        public long getContentLength()
        Returns the length of the serialized data if it's known without doing the actual serialization.
        Specified by:
        getContentLength in interface Artifact
        Returns:
        the length or -1 if the length cannot be determined.
      • getLastModified

        public long getLastModified()
        Returns the last modified date or 0 if not known.
        Specified by:
        getLastModified in interface Artifact
        Returns:
        the last modified date or 0