DataFlavor
173174175176177178179180181182183
{ DataFlavor f = new DataFlavor("application/text; param1=xyz", "Plain Text"); try { f.writeExternal(output); } catch (IOException ex) { fail(); }
4445464748495051525354
{ DataFlavor f = new DataFlavor("application/text; param1=xyz", "Plain Text"); ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); f.writeExternal(oos); ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); ObjectInputStream ois = new ObjectInputStream(bais); DataFlavor read = new DataFlavor(); read.readExternal(ois);