Class ClipboardFormats
java.lang.Object
com.sk89q.worldedit.extent.clipboard.io.ClipboardFormats
-
Method Summary
Modifier and TypeMethodDescriptionstatic ClipboardFormat
findByAlias
(String alias) Find the clipboard format named by the given alias.static ClipboardFormat
findByFile
(File file) Detect the format of a given file.static ClipboardFormat
findByInputStream
(Supplier<InputStream> inputStreamSupplier) Detect the format of a given input stream.static Collection<ClipboardFormat>
getAll()
static String[]
Not public API, only used by SchematicCommands.static com.google.common.collect.Multimap<String,
ClipboardFormat> A mapping from extensions to formats.static void
-
Method Details
-
registerClipboardFormat
-
findByAlias
Find the clipboard format named by the given alias.- Parameters:
alias
- the alias- Returns:
- the format, otherwise null if none is matched
-
findByFile
Detect the format of a given file.- Parameters:
file
- the file- Returns:
- the format, otherwise null if one cannot be detected
-
findByInputStream
@Nullable public static ClipboardFormat findByInputStream(Supplier<InputStream> inputStreamSupplier) Detect the format of a given input stream.- Parameters:
inputStreamSupplier
- The input stream supplier- Returns:
- the format, otherwise null if one cannot be detected
-
getFileExtensionMap
A mapping from extensions to formats.- Returns:
- a multimap from a file extension to the potential matching formats.
-
getAll
-
getFileExtensionArray
Not public API, only used by SchematicCommands. It is not in SchematicCommands because it may rely on internal register calls.
-