public class FileBlob extends DefaultStreamBlob implements Serializable
EMPTY_BYTE_ARRAY, EMPTY_INPUT_STREAM, EMPTY_READER, EMPTY_STRING| Constructor and Description |
|---|
FileBlob(File file) |
FileBlob(File file,
String ctype) |
FileBlob(File file,
String mimeType,
String encoding) |
FileBlob(File file,
String mimeType,
String encoding,
String filename,
String digest) |
FileBlob(InputStream in) |
FileBlob(InputStream in,
String ctype) |
FileBlob(InputStream in,
String mimeType,
String encoding) |
| Modifier and Type | Method and Description |
|---|---|
File |
getFile() |
long |
getLength()
Gets the data length in bytes if known.
|
InputStream |
getStream() |
boolean |
isPersistent()
Checks whether this blob is persistent.
|
Blob |
persist()
Persist this stream so that
Blob.getStream() method can be called
successfully several times. |
getDigest, getEncoding, getFilename, getMimeType, setDigest, setEncoding, setFilename, setMimeTypeasByteArrayBlob, asStringBlob, getByteArray, getReader, getString, readBytes, readBytes, readStringcopy, copy, transferTo, transferTo, transferTopublic FileBlob(File file)
public FileBlob(File file, String mimeType, String encoding, String filename, String digest)
public FileBlob(InputStream in) throws IOException
IOExceptionpublic FileBlob(InputStream in, String ctype) throws IOException
IOExceptionpublic FileBlob(InputStream in, String mimeType, String encoding) throws IOException
IOExceptionpublic File getFile()
public long getLength()
BlobgetLength in interface BlobgetLength in class StreamBlobpublic InputStream getStream() throws IOException
getStream in interface BlobIOExceptionpublic Blob persist()
BlobBlob.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.
public boolean isPersistent()
BlobBlob.getStream() can be
successfully called several times).isPersistent in interface BlobCopyright © 2013 Nuxeo SA. All Rights Reserved.