Class ByteCopier


  • public abstract class ByteCopier
    extends java.lang.Object
    Base class that can copy bytes into a Transferable object, and paste bytes into a program.
    • Field Detail

      • BYTE_STRING_FLAVOR

        public static java.awt.datatransfer.DataFlavor BYTE_STRING_FLAVOR
      • BYTE_STRING_NO_SPACES_FLAVOR

        public static java.awt.datatransfer.DataFlavor BYTE_STRING_NO_SPACES_FLAVOR
      • EMPTY_LIST

        protected static final java.util.List<ClipboardType> EMPTY_LIST
      • BYTE_STRING_TYPE

        public static final ClipboardType BYTE_STRING_TYPE
      • BYTE_STRING_NO_SPACE_TYPE

        public static final ClipboardType BYTE_STRING_NO_SPACE_TYPE
      • currentProgram

        protected Program currentProgram
    • Constructor Detail

      • ByteCopier

        protected ByteCopier()
    • Method Detail

      • copyBytes

        protected java.awt.datatransfer.Transferable copyBytes​(boolean includeSpaces,
                                                               TaskMonitor monitor)
      • copyBytes

        protected java.awt.datatransfer.Transferable copyBytes​(AddressSetView addresses,
                                                               boolean includeSpaces,
                                                               TaskMonitor monitor)
      • copyBytesAsString

        protected java.lang.String copyBytesAsString​(AddressSetView addresses,
                                                     boolean includeSpaces,
                                                     TaskMonitor monitor)
      • supportsPasteTransferable

        protected boolean supportsPasteTransferable​(java.awt.datatransfer.Transferable transferable)
      • isValidBytesTransferable

        protected boolean isValidBytesTransferable​(java.awt.datatransfer.Transferable transferable)
      • pasteBytes

        protected boolean pasteBytes​(java.awt.datatransfer.Transferable pasteData)
                              throws java.awt.datatransfer.UnsupportedFlavorException,
                                     java.io.IOException
        Throws:
        java.awt.datatransfer.UnsupportedFlavorException
        java.io.IOException
      • pasteByteString

        protected boolean pasteByteString​(java.lang.String string)
      • createStringTransferable

        public static java.awt.datatransfer.Transferable createStringTransferable​(java.lang.String text)
        Create a Transferable from the given text.
        Parameters:
        text - text used to create a Transferable
        Returns:
        a Transferable