src/org/nixos/disnix/client/DisnixInterface.java
/**
	 * Exports derivations into a file containing the closure and downloads
	 * it from the client.
	 * 
	 * @param derivation Path to the Nix store component on the server
	 * @return Path to the temp dir in which the downloaded snapshot is stored
	 * @throws AxisFault If an error occurs with the transport
	 * @throws IOException If an error occurs with downloading the file
	 */
Exports derivations into a file containing the closure and downloads
it from the client.

@param derivation Path to the Nix store component on the server
@return Path to the temp dir in which the downloaded snapshot is stored
@throws AxisFault If an error occurs with the transport
@throws IOException If an error occurs with downloading the file
Exports derivations into a file containing the closure and downloads it from the client . @param derivation Path to the Nix store component on the server @return Path to the temp dir in which the downloaded snapshot is stored @throws AxisFault If an error occurs with the transport @throws IOException If an error occurs with downloading the file
public String exportRemoteFile(String[] derivation) throws AxisFault, IOException
	{
		try
		{
			QName operation = new QName(NAME_SPACE, "exportRemoteFile");
			Object[] args = { derivation };
			Class<?>[] returnTypes = { DataHandler.class };
			Object[] response = serviceClient.invokeBlocking(operation, args, returnTypes);
			/* Retrieve the data handler */
			DataHandler dataHandler = (DataHandler)response[0];
			/* Generate temp file name */
			File tempFile = File.createTempFile("disnix_closure_", null);
			/* Save file on local filesystem */
			FileOutputStream fos = new FileOutputStream(tempFile);
			dataHandler.writeTo(fos);
			fos.flush();
			fos.close();
			return tempFile.getAbsolutePath();
		}
		catch(AxisFault ex)
		{
			throw ex;
		}
		finally
		{
			serviceClient.cleanup();
			serviceClient.cleanupTransport();
		}
	}
public String exportRemoteFile ( String [ ] derivation ) throws AxisFault , IOException { try { QName operation = new QName ( NAME_SPACE , "exportRemoteFile" ) ; Object [ ] args = { derivation } ; Class < ? > [ ] returnTypes = { DataHandler . class } ; Object [ ] response = serviceClient . invokeBlocking ( operation , args , returnTypes ) ; /* Retrieve the data handler */ DataHandler dataHandler = ( DataHandler ) response [ 0 ] ; /* Generate temp file name */ File tempFile = File . createTempFile ( "disnix_closure_" , null ) ; /* Save file on local filesystem */ FileOutputStream fos = new FileOutputStream ( tempFile ) ; dataHandler . writeTo ( fos ) ; fos . flush ( ) ; fos . close ( ) ; return tempFile . getAbsolutePath ( ) ; } catch ( AxisFault ex ) { throw ex ; } finally { serviceClient . cleanup ( ) ; serviceClient . cleanupTransport ( ) ; } }
Exports derivations into a file containing the closure and downloads
 it from the client.
Exports derivations into a file containing the closure and downloads it from the client .