g();
InputStream in = s .getInputStream();
FileOutputStream fos = new FileOutputStream("slide/" + count + ".jpg");
byte[] buf = new byte[1024];
int lenth = 0;
while ((lenth = in.read(buf)) != -1) {
fos.write(buf, 0 ,lenth);
}
System.out.println("接收图像完成");
count++;
mainFrame.displayNewSlide(); //界面显示新幻灯片
/* 返回结果 */
OutputStream out = s.getOutputStream();
out.write("电脑端收到图像".getBytes());
fos.close();
s.close();
}
} catch (Exception e) {
e.printStackTrace();
}
}
/*** 删除文件夹中所有内容
* @param path 文件夹
* @return
*/
public static boolean delAllFile(String path) {
boolean flag = false;
File file = new File(path);
if (!file.exists()) {
return flag;
}
if (!file.isDirectory()) {
return flag;
}
String[] tempList = file.list();
File temp = null;
for (int i = 0; i < tempList.length; i++) {
if (path.endsWith(File.separator)) {
temp = new File(path + tempList[i]);
} else {
temp = new File(path + File.separator + tempList[i]);
}
if (temp.isFile()) {
temp.delete();
}
if (temp.isDirectory()) {
delAllFile(path + "/" + tempList[i]);
flag = true;
}
}
return flag;
}
}
5 系统测试
测试的目的在于发现客户端系统中的不足之处并进行改进。本系统各模块除了在设计时进行了单元测试外,还在最后还将安装有Android系统幻灯片无线播放系统客户端的智能手机与多媒体处理服务器连接进行了系统级的总体测试。
5.1 测试环境搭建
测试环境主要是基于实验室环境。
实现过程:
Android智能手机通过本身的便携式WLAN热点与电脑端相连。
HTC Android智能手机的操作系统为Android 4。该操作系统上装有基于Android系统的幻灯片无线播放系统软件,Android端IP地址为192.168.1.248。PC端装有Windows操作系统,IP地址为192.168.1.10。
5.2 功能和性能测试
手机端设置主界面状态图如5.1所示
图5.1 设置界面状态图
传输画面具体如图5.2所示,这样可以印证这样一个幻灯片无线播放过程。
图5.2 无线播放过程传输画面
根据以上对各个测试用例结果的分析,可以看出基于Android系统的幻灯片无线播放系统运行状况良好,满足视频互联项目的基本要求。
结 论
随着移动互联网络的普及以及技术的发展,移动终端应用必将成为新的热点,Android操作系统以强劲的增长,已经成为一种主流的移动终端操作系统。随着网络带宽的增长,移动终端对多媒体应用的需求会越来越多。
论文首先介绍了Android操作系统发展趋势,分析了Android操作系统的系统架构,进一步研究了Android操作系统应用程序的构成组件。接下来介绍了Android系统的实时传输机制,深入研究了Socket网络通信,进一步分析了Android系统的实时处理。理解了在Android操作系统中体时传输系统中的应用特点,为系统设计奠定了坚实的理论基础。
致 谢
时光匆匆,转眼四年的大学学习生活即将结束。大学四年是我增长知识、锻炼科研能力和提高个人综合素质的重要阶段,也是人生中最重要的时期。在此期间,众多的良师益友在学习上对我的指导和帮助。
首先感谢我的指导教师老师,无论是学习时还是在论文撰写期间,穆老师都给予我悉心的指导和无私的帮助。 穆老师宽广无私的胸怀、诲人不倦的教育风范、严谨求实的工作作风、对事业的执着追求,都使我受益匪浅,也是我终身学习的榜样。在此,向穆老师表示深深的感谢,感谢他对我的培养。
我也要感谢四年来所有教导我的老师和陪伴我的同学、朋友,是在你们的关心和帮助下,我才逐渐成长为一个合格的大学生。
最后我要的感谢我的父母,多年来,是他们用无私的爱在默默地奉献并支持着我,没有他们的支持,我不可能顺利地完成学业。4年的学习生活让我感到,自己所获得的每一点成绩,都倾注了许多人的关心和帮助!
在此谨向在大学期间曾经指导过我的老师、同学和所有帮助过我的人致以崇高的敬意!
参考文献
[1] 施铮. J2ME无线移动游戏开发. 第一版. 人民邮电出版社,2006.
[2] 张利国. Java SE应用程序设计. 第一版. 北京理工大学出版,2007.
[3] 范凯. Java技术. 北京工业大学出版,2007.
[5] 邸烁. Android手机平台揭秘和未来发展趋势[EB/OL].IPTUB. 技术门户出版,2008.
[6] 林耕宇. Android对相关产业影响. 电子与电脑[J]出版. 2008.
[7] 舒贤华. 基于Android平台的手机Web地图服务设计【D】. 大连海事大学,2009.
[8] 张利国,龚海平,王植萌. Android移动开发入门与进阶【M】. 人民邮电出版社,2009.
[9] 李刚. 疯狂java讲义. 电子工业出版社,2012.
[10] 梁勇,李娜. java语言程序设计. 机械工业出版社,2011.
附录A:英文原文
Working with Hibernate in Eclipse
With our survey results showing a huge interest in Hibernate, we thought this would be a good week to bring back this piece, by the author of O'Reilly's Hibernate book, on how to use Hibernate with Eclipse, which was also a top vote-getter in the poll.
I recently started using Eclipse as my development environment, in part because of its support for the many platforms on which I develop, and in part because Eclipse is a great example of the power of an open, extensible environment in which people all around the world can contribute. I'm beginning to investigate the extensions people have come up with. For example, I use a little plugin called XMLBuddy to work with XML files, and it's very helpful. So I became curious about whether anyone had written plugins to work with Hibernate, since I've done so much of that recently in putting together the Developer's Notebook. It turns out there are several such efforts underway; in this article we will explore one of them--the Hibernate Synchronizer.
Of the plugins I've found so far, the Hibernate Synchronizer interested me most because it seems to best support the kind of mapping-centric workflow I adopted throughout my Developer's Notebook. (Hibernate can be used in many different ways, so check out the other plugins available; these may be more helpful if your environment calls for another approach.) In fact, the Hibernate Synchronizer plugin removes the need for you to think about updating your Java code when you change your mapping document. In a very Eclipse-like way, it automatically updates the Java code as you edit the mapping. But it goes even farther than Hibernate's built-in code generation tools by creating a pair of classes for each mapped object. It "ow
上一篇:
基于Android的海南风景猜猜看软件的开发与研究
下一篇:
试论APP广告在手机中的应用