5252import java .io .IOException ;
5353import java .io .InputStream ;
5454import java .io .OutputStream ;
55+ import java .nio .file .Files ;
56+ import java .nio .file .StandardOpenOption ;
5557import java .util .Collections ;
5658import java .util .Locale ;
5759import java .util .Set ;
@@ -118,10 +120,7 @@ public boolean isFormat(final InputStream inputStream) {
118120 @ Override
119121 public boolean isFormat (File file ) {
120122 String name = file .getName ().toLowerCase (Locale .ROOT );
121- if (name .endsWith (".schematic" ) || name .endsWith (".mcedit" ) || name .endsWith (".mce" )) {
122- return false ;
123- }
124- return super .isFormat (file );
123+ return name .endsWith (".schem" ) && super .isFormat (file );
125124 }
126125
127126 @ Override
@@ -261,7 +260,11 @@ public boolean isFormat(InputStream inputStream) {
261260
262261 @ Override
263262 public boolean isFormat (File file ) {
264- return MCEDIT_SCHEMATIC .isFormat (file );
263+ final String filename = file .getName ().toLowerCase (Locale .ROOT );
264+ if (!filename .endsWith (".schematic" ) && !filename .endsWith (".schem" )) {
265+ return false ;
266+ }
267+ return super .isFormat (file );
265268 }
266269
267270 @ Override
@@ -272,7 +275,7 @@ public Set<String> getExplicitFileExtensions() {
272275
273276 /**
274277 * @deprecated Slow, resource intensive, but sometimes safer than using the recommended
275- * {@link BuiltInClipboardFormat#FAST }.
278+ * {@link BuiltInClipboardFormat#FAST_V2 }.
276279 * Avoid using with any large schematics/clipboards for reading/writing.
277280 */
278281 @ Deprecated
0 commit comments