Package org.openjdk.jmc.test.io
Interface IOResource
- All Known Implementing Classes:
FileResource,JarFileResource,ResourceResource
public interface IOResource
An
IOResource represents a file than can be opened without exposing detailed information
about how it's stored. Typically used for accessing file in directories and compressed-files in
the same manner.
Could also be used to access files stored in a remote location, i.e FTP- or HTTP-server Evolve the interface as needed.
-
Method Details
-
open
Opens a stream that can be used to read the contents of the resource. Relies on caller to close the stream.- Returns:
- an
InputStream - Throws:
IOException
-
close
void close()Closes whatever resources are not closed by caller to open. -
getName
String getName()The name of the resource.- Returns:
- the name
-