@@ -33,9 +33,11 @@ such as a method to check for the existence of the resource being pointed to.
3333[[resources-resource]]
3434== The Resource Interface
3535
36- Spring's `Resource` interface is meant to be a more capable interface for abstracting
37- access to low-level resources. The following listing shows the `Resource` interface
38- definition:
36+ Spring's `Resource` interface located in the `org.springframework.core.io.` package is
37+ meant to be a more capable interface for abstracting access to low-level resources. The
38+ following listing provides an overview of the `Resource` interface. See the
39+ {api-spring-framework}/core/io/Resource.html[`Resource`] javadoc for further details.
40+
3941
4042[source,java,indent=0,subs="verbatim,quotes",role="primary"]
4143.Java
@@ -44,17 +46,30 @@ definition:
4446
4547 boolean exists();
4648
49+ boolean isReadable();
50+
4751 boolean isOpen();
4852
53+ boolean isFile();
54+
4955 URL getURL() throws IOException;
5056
57+ URI getURI() throws IOException;
58+
5159 File getFile() throws IOException;
5260
61+ ReadableByteChannel readableChannel() throws IOException;
62+
63+ long contentLength() throws IOException;
64+
65+ long lastModified() throws IOException;
66+
5367 Resource createRelative(String relativePath) throws IOException;
5468
5569 String getFilename();
5670
5771 String getDescription();
72+
5873 }
5974----
6075[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
@@ -64,12 +79,28 @@ definition:
6479
6580 fun exists(): Boolean
6681
67- val isOpen: Boolean
82+ fun isReadable(): Boolean
83+
84+ fun isOpen(): Boolean
6885
69- val url: URL
86+ fun isFile(): Boolean
87+
88+ fun getURL(): URL
89+
90+ @Throws(IOException::class)
91+ fun getURI(): URI
7092
7193 val file: File
7294
95+ @Throws(IOException::class)
96+ fun readableChannel(): ReadableByteChannel
97+
98+ @Throws(IOException::class)
99+ fun contentLength(): long
100+
101+ @Throws(IOException::class)
102+ fun lastModified(): long
103+
73104 @Throws(IOException::class)
74105 fun createRelative(relativePath: String): Resource
75106
0 commit comments