public class URLBlob extends AbstractBlob implements Serializable
Modifier and Type | Field and Description |
---|---|
protected URL |
url |
digest, encoding, filename, mimeType, TEXT_PLAIN, UTF_8
Constructor and Description |
---|
URLBlob(URL url) |
URLBlob(URL url,
String mimeType) |
URLBlob(URL url,
String mimeType,
String encoding) |
URLBlob(URL url,
String mimeType,
String encoding,
String filename)
Deprecated.
since 7.2, use a separate
AbstractBlob.setFilename(java.lang.String) call |
Modifier and Type | Method and Description |
---|---|
InputStream |
getStream()
Gets an
InputStream for the data of this blob. |
equals, equalsStream, getByteArray, getCloseableFile, getCloseableFile, getDigest, getDigestAlgorithm, getEncoding, getFile, getFilename, getLength, getMimeType, getString, hashCode, setDigest, setEncoding, setFilename, setMimeType, transferTo, transferTo
@Deprecated public URLBlob(URL url, String mimeType, String encoding, String filename)
AbstractBlob.setFilename(java.lang.String)
callpublic InputStream getStream() throws IOException
Blob
InputStream
for the data of this blob.
The contract of Blob
is that this method can be called several times and will correctly return a new
InputStream
each time. In other words, several reads of the Blob
can be done.
Like all InputStream
, the result must be closed when done with it to avoid resource leaks.
getStream
in interface Blob
IOException
Copyright © 2017 Nuxeo. All rights reserved.