How to Use File Separator to construct file path in java?

How to Use File Separator to construct file path in java?
DeeKay June 10, 2012 at 11:52 pm · java.io

Many java developers might have came across the code where the developer need to use file separator for the file path or directory path. Many of them are using “/” or “\” depending upon the operating system. Using the forward or backward slash is not a good practice while coding in the java,¬†because¬†your code may…
Continue Reading »


How to Read UTF-8 Data From a File Using Java ?

How to Read UTF-8 Data From a File Using Java ?
DeeKay June 10, 2012 at 11:08 pm · java.io

Below Java Code shows how to read UTF-8 encoded data from a text file –


How to Write UTF-8 Data into a File Using Java ?

How to Write UTF-8 Data into a File Using Java ?
DeeKay June 10, 2012 at 2:22 am · java.io

Below Java Code shows how to write UTF-8 data into a file using Java –


How to back up files from Linux to Gmail?

How to back up files from Linux to Gmail?
DeeKay April 25, 2012 at 1:47 am · Linux

Below steps shows you how to back up files from Linux to Gmail – # cd / && mkdir backup Now, you need to create a script, which will perform backup and mail it for you. # vim /usr/bin/backup copy and paste the following into the file : cd /backup rm -rf /backup/* cp LIST_OF_FILES…
Continue Reading »


Video Tutorial: Java EE 6 and Java SE 7

Video Tutorial: Java EE 6 and Java SE 7
DeeKay April 20, 2012 at 1:54 am · Java EE

Below video tutorial provides details about Glassfish 3.1.1 Java EE6 and Java SE7


How to get the size of a file in java?

How to get the size of a file in java?
DeeKay April 7, 2012 at 2:42 am · java.io

Below java code shows how to get the size of file in bytes –


How to get the list of file system root in java?

How to get the list of file system root in java?
DeeKay April 7, 2012 at 2:28 am · java.io

Below java code show how to get the list of file system root –  


How to get current working directory in java?

How to get current working directory in java?
DeeKay April 6, 2012 at 2:39 am · java.io

You can get current working directory using System.getProperty(“user.dir”) function. Here current working directory means the root folder of your current Java project. Below java code shows how to get current working directory of user –   References: Oracle Java Docs for System Properties


How to detect non-ASCII characters in string?

How to detect non-ASCII characters in string?
DeeKay April 6, 2012 at 1:51 am · java.nio

Below java shows how to detect non-ASCII characters in a String –


How to check if a file exists in java?

How to check if a file exists in java?
DeeKay March 19, 2012 at 1:12 am · java.io

Below Java code shows how to check if a file exists –