platform independent separators in java

line separator (Windows: “\r\n”, UNIX: “\n”) 1. BufferedWriter newline() 2. System.lineSeparator() 3. System.getProperty(“line.separator”) file separator file.separator(windows:”\”; unix:”/”) 1. BufferedWriter newline() 2. System.getProperty(“file.separator”) 3. File.pathSeparator Annotation: In Windows: “D:\codehamster”, you can change it to “D:/codehamster” or “D:\\codehamster”

the useful subclass for BitSet and FastBitSet

BitSet and FastBit will always change themselves if they do some set operations, just like and, or, andNot. To avoid such cases, you should write a extended classes: For BitSet: MyBitSet For FastBitSet: MyFastBitSet

Example for Javolution FastBitSet

Javolution is a High-performence java library, it is not only fast but also very comfortable to use. FastBitSet of Javolution is similar to BitSet of Java native Bib. But there are still some differences in usage: 1. BitSet is cloneable,…

set security level in java control panel

Some times you might face the problem that java application can not be allowed to run in your webbrowser: Error Message: Application Blocked, Your security settings have blocked a local application from runing. What can you do at this time?…