Java Properties Load loadProperties()

Here you can find the source of loadProperties()

Description

load Properties

License

Open Source License

Declaration

private static void loadProperties() throws Exception 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.io.FileInputStream;

import java.util.Properties;

public class Main {
    private static String dataDirName;
    private static String fileType;
    private static String delimiter;
    private static final String DIR_PROP_NAME = "DIR";
    private static final String FILE_TYPE_PROP_NAME = "FILE_TYPE";
    private static final String DELIMITER_PROP_NAME = "DELIMITER";

    private static void loadProperties() throws Exception {
        // TODO Auto-generated method stub
        Properties propFile = new Properties();
        propFile.load(new FileInputStream("dir.properties"));
        dataDirName = propFile.getProperty(DIR_PROP_NAME);
        fileType = propFile.getProperty(FILE_TYPE_PROP_NAME);
        delimiter = propFile.getProperty(DELIMITER_PROP_NAME);
    }//w w w.  j  ava 2  s.c  o  m
}

Related

  1. loadProperties()
  2. loadProperties()
  3. loadProperties()
  4. loadProperties()
  5. loadProperties()
  6. loadProperties()