Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.io.File;

import java.io.IOException;

public class Main {
    static String baseDir = "dist" + File.separator + "signatures";

    /**
     * Read xml Signature by given name from local Signature store
     * @param filename
     * @return File object with xml signature
     * @throws Exception when file doesn't exists
     */
    public static File getSignatureXMLFile(String filename) throws IOException {
        File file = new File(baseDir + File.separator + filename);
        if (!file.exists())
            throw new IOException("given xml signature file doesn't exist :" + filename);
        return file;
    }
}