3232import java .io .IOException ;
3333import java .net .URISyntaxException ;
3434
35- import org .scijava .io .location .FileLocation ;
3635import org .scijava .io .location .Location ;
3736import org .scijava .io .location .LocationService ;
3837import org .scijava .plugin .HandlerPlugin ;
@@ -58,7 +57,6 @@ public interface IOPlugin<D> extends HandlerPlugin<Location> {
5857 Class <D > getDataType ();
5958
6059 /** Checks whether the I/O plugin can open data from the given source. */
61- @ SuppressWarnings ("unused" )
6260 default boolean supportsOpen (final String source ) {
6361 try {
6462 return supportsOpen (context ().service (LocationService .class ).resolve (source ));
@@ -69,12 +67,12 @@ default boolean supportsOpen(final String source) {
6967 }
7068
7169 /** Checks whether the I/O plugin can open data from the given location. */
70+ @ SuppressWarnings ("unused" )
7271 default boolean supportsOpen (final Location source ) {
7372 return false ;
7473 }
7574
7675 /** Checks whether the I/O plugin can save data to the given destination. */
77- @ SuppressWarnings ("unused" )
7876 default boolean supportsSave (final String destination ) {
7977 try {
8078 return supportsSave (context ().service (LocationService .class ).resolve (destination ));
@@ -85,6 +83,7 @@ default boolean supportsSave(final String destination) {
8583 }
8684
8785 /** Checks whether the I/O plugin can save data to the given location. */
86+ @ SuppressWarnings ("unused" )
8887 default boolean supportsSave (final Location destination ) {
8988 return false ;
9089 }
@@ -108,12 +107,12 @@ default D open(final String source) throws IOException {
108107 }
109108
110109 /** Opens data from the given location. */
110+ @ SuppressWarnings ("unused" )
111111 default D open (final Location source ) throws IOException {
112112 throw new UnsupportedOperationException ();
113113 }
114114
115115 /** Saves the given data to the specified destination. */
116- @ SuppressWarnings ("unused" )
117116 default void save (final D data , final String destination ) throws IOException {
118117 try {
119118 save (data , context ().service (LocationService .class ).resolve (destination ));
@@ -124,6 +123,7 @@ default void save(final D data, final String destination) throws IOException {
124123 }
125124
126125 /** Saves the given data to the specified location. */
126+ @ SuppressWarnings ("unused" )
127127 default void save (final D data , final Location destination ) throws IOException {
128128 throw new UnsupportedOperationException ();
129129 }
0 commit comments