|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.axiom.util.activation.DataSourceUtils
public class DataSourceUtils
Contains utility methods to work with DataSource objects.
| Constructor Summary | |
|---|---|
DataSourceUtils()
|
|
| Method Summary | |
|---|---|
static long |
getSize(javax.activation.DataSource ds)
Determine the size of the data represented by a DataSource object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DataSourceUtils()
| Method Detail |
|---|
public static long getSize(javax.activation.DataSource ds)
DataSource object.
The method will try to determine the size without reading the data source.
It will do so by looking for the SizeAwareDataSource interface. In addition, it
supports some other well known data source implementations for which it is possible to
get the size of the data without reading it.
As noted in the documentation of the SizeAwareDataSource, the returned value
may be an estimation that is not 100% accurate, and code using this method must be prepared
to receive more or less data from the data source.
ds - the data source
-1 if the size is unknown
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||