public class HintArtifact extends org.apache.jackrabbit.vault.fs.impl.AbstractArtifact implements ExportArtifact, ImportArtifact
Constructor and Description |
---|
HintArtifact(java.lang.String name)
Constructs a new directory type artifact with the given repository name.
|
HintArtifact(java.lang.String name,
java.lang.String extension)
Constructs a new directory type artifact with the given repository name
and extension
|
Modifier and Type | Method and Description |
---|---|
long |
getContentLength()
Returns the length of the serialized data if it's known without doing the
actual serialization.
|
VaultInputSource |
getInputSource()
Returns an input source to the contents of this artifact.
|
java.io.InputStream |
getInputStream()
Returns the input stream to the contents of this artifact.
|
long |
getLastModified()
Returns the last modified date or
0 if not known. |
AccessType |
getPreferredAccess()
Returns the preferred access value for this artifact.
|
SerializationType |
getSerializationType()
Returns the serialization type of this artifact.
|
void |
spool(java.io.OutputStream out)
Writes the content to the given output stream and closes it afterwards.
|
dump, equals, getContentType, getExtension, getPlatformPath, getRelativePath, getType, hashCode, toString
getContentType, getExtension, getPlatformPath, getRelativePath, getType
public HintArtifact(java.lang.String name)
name
- the repository name for this artifact.public HintArtifact(java.lang.String name, java.lang.String extension)
name
- the repository name for this artifact.extension
- the extension for this artifactpublic SerializationType getSerializationType()
getSerializationType
in interface Artifact
public AccessType getPreferredAccess()
getPreferredAccess
in interface Artifact
AccessType.NONE
public void spool(java.io.OutputStream out) throws java.io.IOException, RepositoryException
spool
in interface Artifact
spool
in class org.apache.jackrabbit.vault.fs.impl.AbstractArtifact
out
- the output stream to spool tojava.io.IOException
- if an I/O error occursRepositoryException
- if a repository error occurspublic java.io.InputStream getInputStream() throws java.io.IOException, RepositoryException
getInputStream
in interface Artifact
java.io.IOException
- if an I/O error occursRepositoryException
- if a repository error occurspublic VaultInputSource getInputSource() throws java.io.IOException, RepositoryException
AccessType.STREAM
.getInputSource
in interface Artifact
java.io.IOException
- if an I/O error occurs.RepositoryException
- of a repository error occurs.public long getContentLength()
getContentLength
in interface Artifact
-1
if the length cannot be determined.public long getLastModified()
0
if not known.getLastModified
in interface Artifact
0
Copyright © 2010 - 2020 Adobe. All Rights Reserved