Java 资源加载库 Azzet

码农软件 · 软件分类 · 常用工具包 · 2019-08-15 05:58:23

软件介绍

Azzet 是一个简单的 Java 类库,用于从不同的源中加载资源。

示例代码:

BufferedImage img = Assets.load("http://www.google.com/logos/classicplus.png"); // loaded from website
Font fnt = Assets.load("myfont.ttf", new FontInfo(32.0f)); // loaded from classpath
Clip snd = Assets.load("C:\UserData\MyMusic.wav"); // loaded from file-system
BufferedImage gif = Assets.loadFrom("mygif.gif", BufferedImage.class); // you can request the return type
BufferedImage[] animatedGif = Assets.loadFrom("mygif.gif", "db"); // loads from DatabaseSource saved as "db"
Properties props = Assets.loadFrom("app.properties", "tcp"); // loads from TcpSource saved as "tcp"

支持的格式包括:

支持的数据源:

  • Classpath

  • File-System

  • Database

  • JAR

  • FTP

  • HTTP/HTTPS

  • UDP

  • TCP

  • SSL

  • UDP Multicast

示例代码:

FutureAssetBundle bundle = new FutureAssetBundle();
bundle.add( Assets.loadFuture("image.gif", BufferedImage.class) );
bundle.add( Assets.loadFuture("sound.wav", Clip.class) );

BufferedImage image = null;
Clip sound = null;

// game loop
while (running) {
   // do stuff
   // this occurs during the loading screen....
   if (bundle.isComplete()) {
       bundle.loaded(); // notify all FutureAsset implementations the asset has been accepted.
       image = bundle.getAsset("image.gif");
       sound = bundle.getAsset("sound.wav");
       // move from loading to play screen
   } else {
       display bundle.percentComplete();     
   }
   // do other stuff
}

本文地址:https://codercto.com/soft/d/12388.html

大学的终结

大学的终结

[美] 凯文·凯里(Kevin Carey) / 朱志勇、韩倩 / 人民邮电出版社 / 2017-2-28 / 59.00

你了解目前全球高等教育的现状吗?你知道高等教育的未来是什么样的吗?你听说过泛在大学吗?翻开本书,了解大学的过去、现在与未来。 《大学的终结:泛在大学与高等教育革命》一书由美国著名教育作家凯文? 凯里倾情打造。作者在书中详细论述了美国大学的历史变迁、大学的本质、大学的未来、信息技术与教育的关系、泛在大学的定义、传统大学在大趋势下的挣扎,以及未来高等教育的学历认证与呈现形式。本书作者用缜密的逻辑......一起来看看 《大学的终结》 这本书的介绍吧!

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

html转js在线工具
html转js在线工具

html转js在线工具