changed contentLength() from int to long

This commit is contained in:
Juergen Hoeller
2010-08-09 15:58:07 +00:00
parent e250ff0fb4
commit 771db05608
4 changed files with 9 additions and 5 deletions

View File

@@ -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...

View File

@@ -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();
}
/**

View File

@@ -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.