网络字节序转换
摘要:相当方便实用的一个工具类,原始链接已不可知,改正了一些小错误—————————————————————————————————————————————————————————— /***通信格式转换**Java和一些windows编程语言如c、c++、delphi所写的网络程序进行通讯时,需要进行相应的转换*高、低字节之间的转换*windows的字节序为低字节开头*linux,unix的字节序为高字节开头*java则无论平台变化,都是高字节开头*/publicclassFormatTransfer{/***将int转为低字节在前,高字节在后的byte数组*@paramnint*@returnb
阅读全文
posted @
2012-01-13 01:33
网络大豆
阅读(3205)
推荐(0)
javadoc注释规范
摘要:http://kelaocai.iteye.com/blog/227822——————————————————————————————————————————————————————————————————————————一. Java 文档 // 注释一行 /* ...... */ 注释若干行 /** ...... */ 注释若干行,并写入 javadoc 文档 通常这种注释的多行写法如下: /** * ......... * ......... */ javadoc -d 文档存放目录 -author -version 源文件名.java 这条命令编译一个名为 “源文件名.java”的 .
阅读全文
posted @
2012-01-08 13:48
网络大豆
阅读(375)
推荐(0)
Java Media Framework vs IP Camera JPEG/MJPEG
摘要:http://dragosc.itmcd.ro/uncategorized/java-media-framework-vs-ip-camera-jpegmjpeg-complete-overview-sources/————————————————————————————————————————————————————————————————————NOTE: + I will try not to re-write again all the informations I already wrote in “Java Media Framwork vs IP Camera JPEG/MJPE
阅读全文
posted @
2012-01-04 17:29
网络大豆
阅读(1530)
推荐(0)
here is the code for MJPG video capture on ip camera
摘要:http://bytes.com/topic/java/answers/714018-video-capture-using-jmf————————————————————————————————————————————————————————————————importjava.net.*;importcom.sun.image.codec.jpeg.*;importjava.io.*;importjava.awt.*;importjava.awt.event.*;importjava.awt.image.*;importjavax.swing.*;publicclassAxisCamera
阅读全文
posted @
2012-01-04 16:35
网络大豆
阅读(1017)
推荐(0)
GeneRally
摘要:http://gene-rally.com/————————————————————————————————————————————————————————————————
阅读全文
posted @
2012-01-04 14:36
网络大豆
阅读(166)
推荐(0)
Liero AI
摘要:http://helios.et.put.poznan.pl/~sskowron/liero/——————————————————————————————————————————————————————————————library sources: lierosdl-stdlib.zipLinux: lierosdl-2.02.tar.gzWin32 (old): lierosdl-2.01.zipsource, newer, only Pascal files: lierosdl-2.01-src.tar.gzsource, older: lierosdl-2.00-src.zip————
阅读全文
posted @
2012-01-04 14:34
网络大豆
阅读(147)
推荐(0)
Java命名惯例的两个特殊情况
摘要:摘自《Java Rules》中文版java.lang.Math类中的sin和cos方法使用的就是数学上的惯例。即便如此,它们仍然有违Java命名惯例,因为它们仍然是短小的并且不是动词。比较下面另个方法名:setXAndY()setXandY()另一个例子:Math类中的IEEEremainder() IEEERemainder() 为了将这些例外的情况形成一个规则,我们可以这样假定:如果前一个单词的最后一个字母是大写的,那么就不要遵守大写单词的首字母的规则。当前一个单词是一个字母或者是首字母缩写词就符合这种情况。
阅读全文
posted @
2011-12-24 16:36
网络大豆
阅读(188)
推荐(0)
转一个技术博客http://www.antonioshome.net/blog/
摘要:http://www.antonioshome.net/blog/
阅读全文
posted @
2011-12-22 18:04
网络大豆
阅读(249)
推荐(0)
转:我的Java学习推荐书目
摘要:http://rdc.taobao.com/team/jm/archives/522—————————————————————————————————————————————————————— 一直有这么个想法,列一下我个人认为在学习和使用Java过程中可以推荐一读的书籍,给初学者或者想深入的朋友一些建议,帮助成长。推荐的的都是我自己读过,也会推荐一些朋友读过并且口碑不错的书籍。 一、基础类 1、《Thinking in java》,入门第一位是建立正确的概念。 2、《Core Java》,我没系统读过,这本书更贴近实践,更多API的介绍,同样,更新也更频繁。 二、进阶类 1、《...
阅读全文
posted @
2011-12-01 14:09
网络大豆
阅读(292)
推荐(0)
一个单独的UDP数据包能够放入数据的最大长度是65508
摘要:如题,所以声明65535的字节数组是浪费的 另外这个网站有好多java的教程http://tutorials.jenkov.com/
阅读全文
posted @
2011-11-28 16:39
网络大豆
阅读(335)
推荐(0)
使用jetty做为server提供多线程文件下载
摘要:http://agapple.iteye.com/blog/1189612———————————————————————————————————————————————————————— 使用jetty做为server提供多线程文件下载 博客分类:javalinux 背景 最近在做的一个项目,两个java进程之间会涉及一个大数据量的传递过程,基本都是图片文件,(做了压缩后还是会比较大,最大的有超过600MB)。其次这两个java进程是在跨机房,比如中国和美国机房,网络待框也就几百kB。 这就是本文...
阅读全文
posted @
2011-11-16 14:49
网络大豆
阅读(742)
推荐(0)
Creating a Custom Socket Type
摘要:http://download.oracle.com/javase/1.3/docs/guide/rmi/sockettype.doc.html—————————————————————————————————————————————————— Creating a Custom Socket Type Often it is necessary to process data either before it is sent to, or after it has been received from, a socket. Instead o...
阅读全文
posted @
2011-11-13 17:02
网络大豆
阅读(253)
推荐(0)
Extending Sockets in JDK 1.1
摘要:http://download.oracle.com/javase/1.3/docs/guide/net/extendingSocks.html———————————————————————————————————————————————— Extending Sockets in JDK 1.1 Some of the improvements to the java.net classes in JDK 1.1 allow sockets (Socket/ServerSocket) to be non-final, extendable classes. The basic ...
阅读全文
posted @
2011-11-13 16:41
网络大豆
阅读(231)
推荐(0)
Best practice to use ConcurrentMap's putIfAbsent
摘要:http://stackoverflow.com/questions/3752194/best-practice-to-use-concurrentmaps-putifabsent——————————————————————————————————————————————————I have been using Java's ConcurrentMap for a map that can be used from multiple threads. The putIfAbsent is a great method and is much easier to read/write
阅读全文
posted @
2011-11-04 14:01
网络大豆
阅读(476)
推荐(0)
格式化文本支持:JTextPane
摘要:http://www.cnblogs.com/xingqi/archive/2011/04/20/2022188.html————————————————————————————————————————————————————————Java Swing的JTextPane支持格式化文本,即字体、大小、加粗、倾斜、下划线、颜色等,还支持图片、任意组件Component及段落格式等,相关 概念还有文档StyledDocument、编辑器StyledEditorKit、格式集AttributeSet和格式工具 StyleConstants。 常见的聊天窗口之记录框和输入框的显示不太一样,记录框..
阅读全文
posted @
2011-11-03 20:40
网络大豆
阅读(662)
推荐(0)
转:jxmultisplitpane: how to use?
摘要:http://stackoverflow.com/questions/6117826/jxmultisplitpane-how-to-use————————————————————————————————————————————————————————//Simplecase:createsasplitpanewiththree//compartmentsJXMultiSplitPanesp=newJXMultiSplitPane();sp.setModel(newDefaultSplitPaneModel());sp.add(left,DefaultSplitPaneModel.LEFT);
阅读全文
posted @
2011-11-03 16:03
网络大豆
阅读(469)
推荐(0)
关于Native Library在NetbeansRCP应用中的设置
摘要:在Netbeans RCP中利用JMF框架实现音频视频的传输,开始就遇到一个问题,网上搜索了一下,与下面这个类似,直接贴过来吧——————————————————————————————————————————————————————————————http://stackoverflow.com/questions/5887383/netbeans-platform-application-doesnt-detect-webcam-devices-with-jmfI've been trying to develop an application with Netbeans RCP
阅读全文
posted @
2011-11-02 11:22
网络大豆
阅读(877)
推荐(0)
Simple example of using the Java Native Interface
摘要:http://www.java-tips.org/other-api-tips/jni/simple-example-of-using-the-java-native-interface.html————————————————————————————————————————————————————————————This tip shows you how to program a simple example of using the Java Native Interface. We will write a Java application that calls a C functio
阅读全文
posted @
2011-11-02 09:50
网络大豆
阅读(223)
推荐(0)
Java Application Development(包括如何设置本地库)
摘要:Choosing the JDK version for your program: Right-click on your project ⇒ "Properties" ⇒ "Source" node ⇒ You can select the JDK level of your project in pull-donw menu "Source/Binary Format".Enabling JDK 7 support: If JDK 7 is already installed in your system, right-clic
阅读全文
posted @
2011-11-02 09:43
网络大豆
阅读(330)
推荐(0)
转:通信程序中图文混排与表情选择的实现
摘要:http://severus-zhang.iteye.com/blog/1198049———————————————————————————————————————————————————————— 最近在做的一个仿QQ的通信项目中,需要实现QQ聊天界面中的表情选择和显示功能,纠结了许久,终于解决。 首先对这个流程进行分析:点击单人聊天界面上的表情按钮后,自动弹出表情选择框,单击表情框中图标,聊天界面编辑区添加上表情包中指定的表情图标,点击发 送按钮后,程序获取编辑区的图文混合信息,按照通信协议传输该信息,接收方收到之后,解析该图文信息,区分开图标和文本信息,然后在己方聊天显示界面上显...
阅读全文
posted @
2011-11-01 09:10
网络大豆
阅读(335)
推荐(0)