contentLength support for Resource decoding
Expose the known content length, if known, in the InputStreamResource returned by ResourceHttpMessageConverter or ResourceDecoder. See gh-24292
This commit is contained in:
committed by
Rossen Stoyanchev
parent
e3e7d90415
commit
e96b71acf3
@@ -83,6 +83,11 @@ public class ResourceDecoder extends AbstractDataBufferDecoder<Resource> {
|
||||
public String getFilename() {
|
||||
return filename;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long contentLength() {
|
||||
return bytes.length;
|
||||
}
|
||||
};
|
||||
}
|
||||
else if (Resource.class.isAssignableFrom(clazz)) {
|
||||
|
||||
Reference in New Issue
Block a user