Methods Summary |
---|
public abstract java.io.InputStream | getInputStream()Get an input stream to retrieve the data stored in the datasource
|
public long | getMessageSize()Return the size of all the data.
Default implementation... others can override to do this much faster
int size = 0;
InputStream in = null;
try {
in = getInputStream();
int read = 0;
byte[] data = new byte[1024];
while ((read = in.read(data)) > 0) {
size += read;
}
} finally {
try {
if (in != null) {
in.close();
}
} catch (IOException ioe) {
// Exception ignored because logging is
// unavailable
}
}
return size;
|
public abstract java.lang.String | getSourceId()Returns a unique String ID that represents the location from where
this file is loaded. This will be used to identify where the data
is, primarily to avoid situations where this data would get overwritten.
|