When editing source files, make sure you use the right file encoding. For the Apache DirectMemory project, UTF-8 has been chosen as the default file encoding. UTF-8 is an encoding scheme for the Unicode character set and as such allows to encode all characters that Java can handle. The source files should not contain the byte order mark (BOM). There can be exceptions to this general rule, e.g. properties files are usually encoded using ISO-8859-1 as per the JRE API, so please keep this in mind, too.
The following sections show how to set up the code style for DirectMemory in IDEA and Eclipse. It is strongly preferred that patches use this style before they are supplied.
Download directmemory-idea-codestyle.xml and copy it to ~/.IntelliJIDEA/config/codestyles then restart IDEA. On Windows, try C:\Documents and Settings\<username>\.IntelliJIDEA\config\codestyles
After this, restart IDEA and open the settings to select the new code style.
After this, select Window > Preferences, and open up the configuration for Java > Code Style > Code Formatter. Click on the button labeled Import... and select the file you downloaded. Give the style a name, and click OK.