Hello I'm trying make a simple program for saving and reusing clipboard content but i cannot realize how to get clipboard content as byte array without using casting to some Dataflavor because i need save and set content without changing. how i can achive this result?
Had tried do like that but this working only for text data.
Clipboard cl = Toolkit.getDefaultToolkit().getSystemClipboard();
InputStream s = (InputStream)cl.getData(newDataFlavor("text/rtf;class=java.io.InputStream"));