All Downloads are FREE. Search and download functionalities are using the official Maven repository.

src.samples.java.ex.PUS_Sample Maven / Gradle / Ivy

Go to download

An auxiliary findbugs.sourceforge.net plugin for java bug detectors that fall outside the narrow scope of detectors to be packaged with the product itself.

The newest version!
package ex;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.io.Serializable;

public class PUS_Sample implements Serializable {
    private int a;
    private int b;

    private class Inner implements Serializable {
        private int c;
        private int d;
    }

    private static class StaticInner implements Serializable {
        private int e;
        private int f;
    }

    public void writeIt(String path) throws IOException {
        Inner i = new Inner();
        FileOutputStream fos = new FileOutputStream(path);
        ObjectOutputStream oos = new ObjectOutputStream(fos);
        oos.writeObject(i);
        oos.writeObject(new StaticInner());
        oos.flush();
        oos.close();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy