ISVNRemoteResource remoteResource = (ISVNRemoteResource) object; try {  ByteArrayOutputStream out = new ByteArrayOutputStream(); DataOutputStream writeOut = new DataOutputStream(out);   writeOut.writeBoolean(remoteResource.isFolder());   writeOut.writeUTF(remoteResource.getUrl().toString());   writeOut.writeUTF(remoteResource.getRepository().getUrl().toString());   writeOut.writeUTF(remoteResource.getRevision().toString());   writeOut.writeUTF(remoteResource.getLastChangedRevision().toString());  writeOut.writeLong( remoteResource.getDate().getTime()); writeOut.writeUTF( remoteResource.getAuthor());  writeOut.close();   byte[] buffer = out.toByteArray(); super.javaToNative(buffer, transferData);  } catch (IOException e) { }
byte[] buffer = toByteArray((ISVNRemoteResource) object); super.javaToNative(buffer, transferData);
    public void javaToNative (Object object, TransferData transferData) {    	if (object == null || !(object instanceof ISVNRemoteResource)) return;    	    	if (isSupportedType(transferData)) {    		ISVNRemoteResource remoteResource = (ISVNRemoteResource) 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);                   				// write 1 if remote resource is folder, 0 otherwise                writeOut.writeBoolean(remoteResource.isFolder());                                    // we write the url of the remote resource    			writeOut.writeUTF(remoteResource.getUrl().toString());    				                // we write the url of the repository    			writeOut.writeUTF(remoteResource.getRepository().getUrl().toString());    		                    // we write the revision                writeOut.writeUTF(remoteResource.getRevision().toString());                // we write the last changed revision                writeOut.writeUTF(remoteResource.getLastChangedRevision().toString());                                writeOut.writeLong( remoteResource.getDate().getTime());                writeOut.writeUTF( remoteResource.getAuthor());                                writeOut.close();                // converts a java byte[]to a platform specific representation                byte[] buffer = out.toByteArray();    		    super.javaToNative(buffer, transferData);    			    	   } catch (IOException e) {    	   }    	}    }