|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.day.jcr.vault.fs.impl.AbstractArtifact
com.day.jcr.vault.fs.SerializerArtifact
public class SerializerArtifact
Implements an output artifact that is based on a serializer, i.e. the
preferred access method is AccessType.SPOOL
| Constructor Summary | |
|---|---|
SerializerArtifact(Artifact parent,
String name,
String ext,
ArtifactType type,
Serializer serializer,
long lastModified)
Constructs a new artifact that is based on a content serializer. |
|
| Method Summary | |
|---|---|
long |
getContentLength()
Returns the length of the serialized data if it's known without doing the actual serialization. |
String |
getContentType()
Returns the content type of the serialized data or null if
the type is not known or cannot be determined. |
VaultInputSource |
getInputSource()
Returns an input source to the contents of this artifact. |
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(OutputStream out)
Writes the content to the given output stream and closes it afterwards. |
| Methods inherited from class com.day.jcr.vault.fs.impl.AbstractArtifact |
|---|
dump, equals, getExtension, getPlatformPath, getRelativePath, getType, hashCode, setContentType, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.day.jcr.vault.fs.api.Artifact |
|---|
getExtension, getPlatformPath, getRelativePath, getType |
| Methods inherited from interface com.day.jcr.vault.fs.api.Dumpable |
|---|
dump |
| Constructor Detail |
|---|
public SerializerArtifact(Artifact parent,
String name,
String ext,
ArtifactType type,
Serializer serializer,
long lastModified)
parent - the parent artifactname - the name of the artifactext - the extension of the artifacttype - the type of the artifactserializer - the serializer to use for the contentlastModified - the last modified date
IllegalArgumentException - if the type is not suitable.| Method Detail |
|---|
public AccessType getPreferredAccess()
getPreferredAccess in interface ArtifactAccessType.SPOOLpublic SerializationType getSerializationType()
getSerializationType in interface Artifact
public void spool(OutputStream out)
throws IOException,
RepositoryException
Artifact.getInputStream()
to the provided output stream.
spool in interface Artifactspool in class com.day.jcr.vault.fs.impl.AbstractArtifactout - the output stream to spool to
IOException - if an I/O error occurs
RepositoryException - if a repository error occurs
public InputStream getInputStream()
throws IOException,
RepositoryException
getInputStream in interface ArtifactIOException - if an I/O error occurs
RepositoryException - if a repository error occurs
public VaultInputSource getInputSource()
throws IOException,
RepositoryException
AccessType.STREAM.
getInputSource in interface ArtifactIOException - if an I/O error occurs.
RepositoryException - of a repository error occurs.public String getContentType()
null if
the type is not known or cannot be determined.
getContentType in interface ArtifactgetContentType in class com.day.jcr.vault.fs.impl.AbstractArtifactnull.public long getContentLength()
getContentLength in interface Artifact-1 if the length cannot be determined.public long getLastModified()
0 if not known.
getLastModified in interface Artifact0
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||