Load Properties File Classpath Java If you want to read Properties file values using classpath then its mandatory to put property file in classpath otherwise you will get exception. If you keep your property file inside src folder then it will … Continue reading
Write Properties File Java Here you will see how to write key with value into property file using java. Below is sample java project with below folder structure:
Check File Exists Java Many time when you work with file its required to check if file exits or not otherwise you many get file not found exception. Below is sample program to check file exists or not:
Get File Path File Java Below is sample java program to get absolute file path of existing file including print its parent directory name:
Create Read Only File Java In below sample program we will create new read only file using File class setWritable(false) operations.
Check hidden file java In below sample you will see how to check if file is hidden using java program:
Get Total Number Lines File Java In this sample java program you will see efficient way to get total number of lines from file using java program:
Convert File Last Modified Time stamp Date In this sample program you will see how to convert file last modified time stamp to date format using java.
Determine File Creation Date Java In this sample java class you will see how to determine file creation date using Java program. We will use JDK 7 java.nio pakcage to determine creation date:
Convert Byte Array File Java Vice Versa If you want to convert byte array to file and vice versa using java you could use java.nio.file.Files.readAllBytes() to read all bytes from file and convert back byte array to file again using … Continue reading