@Override
    public LevelData getData() throws LevelIOException
    {
        String leveltxt = "";
        Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
        //odd: the Object param of getContents is not currently used
        Transferable contents = clipboard.getContents(null);
        boolean hasTransferableText =
                (contents != null)
                && contents.isDataFlavorSupported(DataFlavor.stringFlavor);
        if (hasTransferableText)
            try
            {
                leveltxt = (String) contents.getTransferData(DataFlavor.stringFlavor);
            } catch (UnsupportedFlavorException | IOException ex)
            {
                throw new LevelIOException(ex);
            }

        if (!(leveltxt.startsWith(clipboardHeader) && leveltxt.endsWith(clipboardFooter)))
            throw new LevelIOException("Clipboard contents aren't a NSMB level.");
        leveltxt = leveltxt.substring(11, leveltxt.length() - 12);
        byte[] leveldata = DatatypeConverter.parseBase64Binary(leveltxt);
        leveldata = LZ.decompress(leveldata);

        return new LevelData(leveldata);
    }