if (isSupportedType(transferData)) {
URLType[] myTypes = (URLType[]) object;
try {
// write data to a byte array and then ask super to convert to pMedium
ByteArrayOutputStream out = new ByteArrayOutputStream();
DataOutputStream writeOut = new DataOutputStream(out);
for (int i = 0, length = myTypes.length; i < length; i++) {
writeOut.writeBytes(myTypes[i].linkURL);
writeOut.writeBytes("\n");
writeOut.writeBytes(myTypes[i].linkText);
}
byte[] buffer = out.toByteArray();
writeOut.close();
super.javaToNative(buffer, transferData);
} catch (IOException e) {
}