org.nuxeo.ecm.core.api.impl.blob
Class URLBlob
java.lang.Object
org.nuxeo.ecm.core.api.impl.blob.AbstractBlob
org.nuxeo.ecm.core.api.impl.blob.StreamBlob
org.nuxeo.ecm.core.api.impl.blob.DefaultStreamBlob
org.nuxeo.ecm.core.api.impl.blob.URLBlob
- All Implemented Interfaces:
- Serializable, Blob
public class URLBlob
- extends DefaultStreamBlob
- Author:
- Bogdan Stefanescu
- See Also:
- Serialized Form
URLBlob
public URLBlob(URL url)
URLBlob
public URLBlob(URL url,
String ctype)
URLBlob
public URLBlob(URL url,
String ctype,
String encoding)
URLBlob
public URLBlob(URL url,
String ctype,
String encoding,
String filename,
String digest)
getStream
public InputStream getStream()
throws IOException
- Throws:
IOException
persist
public Blob persist()
throws IOException
- Description copied from interface:
Blob
- Persist this stream so that
Blob.getStream()
method can be called
successfully several times. The persistence is done in a temporary file
or in memory - this is up to the implementation.
Blobs that are already persistent return themselves.
Persistence should update the internal structure of the Blob to make it
persistent whenever possible and hence return itself whenever possible.
This behavior cannot be guaranteed by every implementation however.
- Returns:
- a persistent version of the blob
- Throws:
IOException
isPersistent
public boolean isPersistent()
- Description copied from interface:
Blob
- Checks whether this blob is persistent. (i.e. if
Blob.getStream()
can be
successfully called several times).
- Returns:
- true if persistent, false otherwise
Copyright © 2011 Nuxeo SAS. All Rights Reserved.