changed contentLength() from int to long
This commit is contained in:
@@ -129,7 +129,7 @@ public abstract class AbstractFileResolvingResource extends AbstractResource {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int contentLength() throws IOException {
|
||||
public long contentLength() throws IOException {
|
||||
URL url = getURL();
|
||||
if (ResourceUtils.isFileURL(url)) {
|
||||
// Proceed with file system resolution...
|
||||
|
||||
@@ -112,8 +112,8 @@ public abstract class AbstractResource implements Resource {
|
||||
* if available.
|
||||
* @see #getFile()
|
||||
*/
|
||||
public int contentLength() throws IOException {
|
||||
return (int) getFile().length();
|
||||
public long contentLength() throws IOException {
|
||||
return getFile().length();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -96,7 +96,7 @@ public interface Resource extends InputStreamSource {
|
||||
* @throws IOException if the resource cannot be resolved
|
||||
* (in the file system or as some other known physical resource type)
|
||||
*/
|
||||
int contentLength() throws IOException;
|
||||
long contentLength() throws IOException;
|
||||
|
||||
/**
|
||||
* Determine the last-modified timestamp for this resource.
|
||||
|
||||
Reference in New Issue
Block a user