当前位置: 首页>>代码示例>>Java>>正文


Java VuzeFile.addComponent方法代码示例

本文整理汇总了Java中com.aelitis.azureus.core.vuzefile.VuzeFile.addComponent方法的典型用法代码示例。如果您正苦于以下问题:Java VuzeFile.addComponent方法的具体用法?Java VuzeFile.addComponent怎么用?Java VuzeFile.addComponent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.aelitis.azureus.core.vuzefile.VuzeFile的用法示例。


在下文中一共展示了VuzeFile.addComponent方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: main

import com.aelitis.azureus.core.vuzefile.VuzeFile; //导入方法依赖的package包/类
public static void
 main(
 	String[]	args )
 {
 	try{
VuzeFile	vf = VuzeFileHandler.getSingleton().create();

Map contents = new HashMap();

contents.put( "type", new Long( 1 ));
contents.put( "term", "donkey" );

vf.addComponent(
	VuzeFileComponent.COMP_TYPE_METASEARCH_OPERATION,
	contents);

vf.write( new File( "C:\\temp\\search.vuze" ));

 	}catch( Throwable e ){
 		
 		e.printStackTrace();
 	}
 }
 
开发者ID:thangbn,项目名称:Direct-File-Downloader,代码行数:24,代码来源:MetaSearchManagerImpl.java

示例2: exportCustomization

import com.aelitis.azureus.core.vuzefile.VuzeFile; //导入方法依赖的package包/类
protected void
exportCustomization(
	CustomizationImpl	cust,
	File				to_file )

	throws CustomizationException
{
	if ( to_file.isDirectory()){
		
		to_file = new File( to_file, cust.getName() + "_" + cust.getVersion() + ".vuze");
	}
	
	if ( !to_file.getName().endsWith( ".vuze" )){
		
		to_file = new File( to_file.getParentFile(), to_file.getName() + ".vuze" );
	}
	
	try{
		Map	contents = new HashMap();
		
		byte[]	data = FileUtil.readFileAsByteArray( cust.getContents());
		
		contents.put( "name", cust.getName());
		contents.put( "version", cust.getVersion());
		contents.put( "data", data );
		
		VuzeFile	vf = VuzeFileHandler.getSingleton().create();
		
		vf.addComponent(
			VuzeFileComponent.COMP_TYPE_CUSTOMIZATION,
			contents);
		
		vf.write( to_file );
		
	}catch( Throwable e ){
		
		throw( new CustomizationException( "Failed to export customization", e ));
	}
}
 
开发者ID:thangbn,项目名称:Direct-File-Downloader,代码行数:40,代码来源:CustomizationManagerImpl.java

示例3: main

import com.aelitis.azureus.core.vuzefile.VuzeFile; //导入方法依赖的package包/类
public static void
main(
	String[]	args )
{
	final String 	NAME 	= "lalalal";
	final String	URL_STR	= "http://www.vuze.com/feed/publisher/ALL/1";
	
	try{
		//AzureusCoreFactory.create();
		/*
		Subscription subs = 
			getSingleton(true).createSingletonRSS(
					NAME,
					new URL( URL_STR ),
					240 );
		
		subs.getVuzeFile().write( new File( "C:\\temp\\srss.vuze" ));
		
		subs.remove();
		*/
		
		VuzeFile	vf = VuzeFileHandler.getSingleton().create();
		
		Map	map = new HashMap();
		
		map.put( "name", NAME );
		map.put( "url", URL_STR );
		map.put( "public", new Long( 0 ));
		map.put( "check_interval_mins", new Long( 345 ));
		
		vf.addComponent( VuzeFileComponent.COMP_TYPE_SUBSCRIPTION_SINGLETON, map );
		
		vf.write( new File( "C:\\temp\\srss_2.vuze" ) );

	}catch( Throwable e ){
		
		e.printStackTrace();
	}
}
 
开发者ID:thangbn,项目名称:Direct-File-Downloader,代码行数:40,代码来源:SubscriptionManagerImpl.java

示例4: exportToVuzeFile

import com.aelitis.azureus.core.vuzefile.VuzeFile; //导入方法依赖的package包/类
public void
exportToVuzeFile(
	File	target )

	throws IOException
{
	VuzeFile	vf = VuzeFileHandler.getSingleton().create();
	
	vf.addComponent(
		VuzeFileComponent.COMP_TYPE_METASEARCH_TEMPLATE,
		exportToBencodedMap());
	
	vf.write( target );
}
 
开发者ID:thangbn,项目名称:Direct-File-Downloader,代码行数:15,代码来源:EngineImpl.java

示例5: getVuzeFile

import com.aelitis.azureus.core.vuzefile.VuzeFile; //导入方法依赖的package包/类
public VuzeFile
getVuzeFile()
{
	VuzeFile	vf = VuzeFileHandler.getSingleton().create();
	
	Map	map = new HashMap();
	
	try{
		exportToBEncodedMap( map );
	
		vf.addComponent( VuzeFileComponent.COMP_TYPE_CONTENT_NETWORK, map );
		
	}catch( Throwable e ){
		
		Debug.printStackTrace( e );
	}
	
	return( vf );
}
 
开发者ID:thangbn,项目名称:Direct-File-Downloader,代码行数:20,代码来源:ContentNetworkImpl.java

示例6: main

import com.aelitis.azureus.core.vuzefile.VuzeFile; //导入方法依赖的package包/类
public static void
main(
	String[]		args )
{
	/*
	try{
		CustomizationManagerImpl	manager = (CustomizationManagerImpl)getSingleton();
		
		CustomizationImpl cust = new CustomizationImpl( manager, "blah", "1.2", new File( "C:\\temp\\cust\\details.zip" ));
	
		cust.exportToVuzeFile( new File( "C:\\temp\\cust" ));
		
	}catch( Throwable e ){
		
		e.printStackTrace();
	}
	*/
	
	try{
		VuzeFile	vf = VuzeFileHandler.getSingleton().create();
		
		Map	config = new HashMap();
		
		List list = new ArrayList();
		
		list.add( "trout" );
		list.add( 45 );
		
		config.put( "test.a10", "Hello mum" );
		config.put( "test.a11", new Long(100));
		config.put( "test.a13", list );
		
		Map	map = new HashMap();
		
		map.put( "name", "My Proxy Settings" );
		map.put( "settings", config );
		map.put( "restart", new Long( 1 ));
		
		vf.addComponent( VuzeFileComponent.COMP_TYPE_CONFIG_SETTINGS, map );
		
		vf.write( new File( "C:\\temp\\p_config.vuze" ) );
		
	}catch( Throwable e ){
		
		e.printStackTrace();
	}
}
 
开发者ID:thangbn,项目名称:Direct-File-Downloader,代码行数:48,代码来源:CustomizationManagerImpl.java

示例7: exportVuzeFile

import com.aelitis.azureus.core.vuzefile.VuzeFile; //导入方法依赖的package包/类
protected VuzeFile
exportVuzeFile(
	DeviceImpl		device )

	throws IOException
{
	VuzeFile	vf = VuzeFileHandler.getSingleton().create();
	
	Map	map = new HashMap();
	
	Map device_map = new HashMap();
	
	map.put( "device", device_map );
	
	device.exportToBEncodedMap( device_map, true );
	
	vf.addComponent( VuzeFileComponent.COMP_TYPE_DEVICE, map );
	
	return( vf );
}
 
开发者ID:thangbn,项目名称:Direct-File-Downloader,代码行数:21,代码来源:DeviceManagerImpl.java

示例8: main

import com.aelitis.azureus.core.vuzefile.VuzeFile; //导入方法依赖的package包/类
public static void
main(
	String[]	args )
{
	try{
		VuzeFile vf = VuzeFileHandler.getSingleton().create();
		
		Map	content = new HashMap();
		
		List	commands = new ArrayList();
		
		content.put( "commands", commands );
		
			// home tab
		
		Map	command1 = new HashMap();
		
		commands.add( command1 );
		
		List	l_args1 = new ArrayList();
		
		//l_args1.add( SkinConstants.VIEWID_HOME_TAB  );
		
		command1.put( "type", new Long( COMMAND_SWITCH_TO_TAB ));
		command1.put( "args", l_args1 );

			// activity tab
		
		Map	command2 = new HashMap();
		
		commands.add( command2 );
		
		List	l_args2 = new ArrayList();
		
		//l_args2.add( SkinConstants.VIEWID_ACTIVITY_TAB );
		
		command2.put( "type", new Long( COMMAND_SWITCH_TO_TAB ));
		command2.put( "args", l_args2 );
		
			// check plugin available
		
		Map	command3 = new HashMap();
		
		commands.add( command3 );
		
		List	l_args3 = new ArrayList();
		
		command3.put( "type", new Long( COMMAND_CONDITION_CHECK ));
		command3.put( "args", l_args3 );
		
		vf.addComponent( VuzeFileComponent.COMP_TYPE_V3_NAVIGATION, content );
		
		vf.write( new File( "C:\\temp\\v3ui.vuze" ));
		
	}catch( Throwable e ){
		
		e.printStackTrace();
	}
}
 
开发者ID:thangbn,项目名称:Direct-File-Downloader,代码行数:60,代码来源:NavigationHelper.java


注:本文中的com.aelitis.azureus.core.vuzefile.VuzeFile.addComponent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。