public class BlobDataSource extends Object implements SizeAwareDataSource
Blob
.Constructor and Description |
---|
BlobDataSource(Blob blob,
String contentType) |
Modifier and Type | Method and Description |
---|---|
String |
getContentType() |
InputStream |
getInputStream() |
String |
getName() |
OutputStream |
getOutputStream() |
long |
getSize()
Get the size of the data source.
|
public InputStream getInputStream() throws IOException
getInputStream
in interface javax.activation.DataSource
IOException
public String getContentType()
getContentType
in interface javax.activation.DataSource
public String getName()
getName
in interface javax.activation.DataSource
public OutputStream getOutputStream() throws IOException
getOutputStream
in interface javax.activation.DataSource
IOException
public long getSize()
SizeAwareDataSource
DataSource.getInputStream()
before reaching
the end of the stream. If the implementation is unable to determine the
size, it must return -1.getSize
in interface SizeAwareDataSource
Copyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.