Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.beans.XMLDecoder;

import java.io.BufferedInputStream;

import java.io.FileInputStream;

public class Main {

    public static Object read(String filename) throws Exception {
        XMLDecoder decoder = new XMLDecoder(new BufferedInputStream(new FileInputStream(filename)));
        Object o = decoder.readObject();
        decoder.close();
        return o;
    }
}