What data flavor should I use to transfer a list of strings? I guess I can serialize the list of strings in JSON format, but was hoping I could just transfer a List directly.
+2
A:
From Java Tutorial
For example, to create a data flavor for the java.util.ArrayList class:
new DataFlavor(ArrayList.class, "ArrayList");
stacker
2010-02-09 06:54:16
+1 (for, among other reasons, finding an official Sun document that uses the phrase "bass-ackwards" regarding Microsoft's OLE :-)
Jason S
2010-02-09 13:15:01
Hmm... is there a way to signify ArrayList<String> vs. just plain ArrayList?
Jason S
2010-02-09 14:27:16
@Jason S I'm afraid that's not possible since it is defined like this:public DataFlavor(Class<?> representationClass, String humanPresentableName)
stacker
2010-02-10 10:19:19
well, that's OK: at least I can use "humanPresentableName" to encode template parameter in string form, if not in a type-safe way.
Jason S
2010-02-10 13:38:38