Consistent ordering of Resource methods
See gh-24651
This commit is contained in:
@@ -21,6 +21,7 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URI;
|
||||
import java.net.URL;
|
||||
import java.nio.channels.ReadableByteChannel;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@@ -201,11 +202,6 @@ public class EncodedResourceResolver extends AbstractResourceResolver {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public InputStream getInputStream() throws IOException {
|
||||
return this.encoded.getInputStream();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean exists() {
|
||||
return this.encoded.exists();
|
||||
@@ -241,6 +237,26 @@ public class EncodedResourceResolver extends AbstractResourceResolver {
|
||||
return this.encoded.getFile();
|
||||
}
|
||||
|
||||
@Override
|
||||
public InputStream getInputStream() throws IOException {
|
||||
return this.encoded.getInputStream();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReadableByteChannel readableChannel() throws IOException {
|
||||
return this.encoded.readableChannel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte[] getContentAsByteArray() throws IOException {
|
||||
return this.encoded.getContentAsByteArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getContentAsString(Charset charset) throws IOException {
|
||||
return this.encoded.getContentAsString(charset);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long contentLength() throws IOException {
|
||||
return this.encoded.contentLength();
|
||||
@@ -267,16 +283,6 @@ public class EncodedResourceResolver extends AbstractResourceResolver {
|
||||
return this.encoded.getDescription();
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte[] getContentAsByteArray() throws IOException {
|
||||
return this.encoded.getContentAsByteArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getContentAsString(Charset charset) throws IOException {
|
||||
return this.encoded.getContentAsString(charset);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpHeaders getResponseHeaders() {
|
||||
HttpHeaders headers;
|
||||
|
||||
@@ -21,6 +21,7 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URI;
|
||||
import java.net.URL;
|
||||
import java.nio.channels.ReadableByteChannel;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@@ -280,9 +281,23 @@ public class VersionResourceResolver extends AbstractResourceResolver {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public String getFilename() {
|
||||
return this.original.getFilename();
|
||||
public InputStream getInputStream() throws IOException {
|
||||
return this.original.getInputStream();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReadableByteChannel readableChannel() throws IOException {
|
||||
return this.original.readableChannel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte[] getContentAsByteArray() throws IOException {
|
||||
return this.original.getContentAsByteArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getContentAsString(Charset charset) throws IOException {
|
||||
return this.original.getContentAsString(charset);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -300,26 +315,17 @@ public class VersionResourceResolver extends AbstractResourceResolver {
|
||||
return this.original.createRelative(relativePath);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public String getFilename() {
|
||||
return this.original.getFilename();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return this.original.getDescription();
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte[] getContentAsByteArray() throws IOException {
|
||||
return this.original.getContentAsByteArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getContentAsString(Charset charset) throws IOException {
|
||||
return this.original.getContentAsString(charset);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InputStream getInputStream() throws IOException {
|
||||
return this.original.getInputStream();
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpHeaders getResponseHeaders() {
|
||||
HttpHeaders headers = (this.original instanceof HttpResource httpResource ?
|
||||
|
||||
Reference in New Issue
Block a user