@@ -0,0 +1,2129 @@
+package io.serialization;%0A%0Aimport java.io.*;%0A%0A/**%0A * Created by igor on 25.06.2015.%0A */%0Apublic class Run %7B%0A%0A    public static PhoneNumber deserizlization()   %7B%0A        PhoneNumber result = null;%0A        File file = new File(%22src/io/serialization/number.obj%22);%0A%0A        try(FileInputStream fileInputStream = new FileInputStream(file);%0A            ObjectInputStream objectOutputStream = new ObjectInputStream(fileInputStream)) %7B%0A%0A            result = (PhoneNumber)objectOutputStream.readObject();%0A%0A        %7D catch (IOException %7C ClassNotFoundException e) %7B%0A            e.printStackTrace();%0A        %7D%0A        return result;%0A    %7D%0A%0A    public static void serizlization(PhoneNumber number)   %7B%0A        File file = new File(%22src/io/serialization/number.obj%22);%0A%0A        try(FileOutputStream fileOutputStream = new FileOutputStream(file);%0A            ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream)) %7B%0A%0A            objectOutputStream.writeObject(number);%0A%0A        %7D catch (IOException e) %7B%0A            e.printStackTrace();%0A        %7D%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        PhoneNumber number = new PhoneNumber(%22home%22,4326456);%0A        System.out.println(number);%0A        serizlization(number);%0A        PhoneNumber readnumber = deserizlization();%0A        System.out.println(%22readed obj%22);%0A        System.out.println(readnumber);%0A    %7D%0A%7D%0A%0Aclass PhoneNumber implements Serializable %7B%0A    private String description;%0A    private long number;%0A%0A    public PhoneNumber(String description, long number) %7B%0A        this.description = description;%0A        this.number = number;%0A    %7D%0A%0A    public String getDescription() %7B%0A        return description;%0A    %7D%0A%0A    public void setDescription(String description) %7B%0A        this.description = description;%0A    %7D%0A%0A    public long getNumber() %7B%0A        return number;%0A    %7D%0A%0A    public void setNumber(long number) %7B%0A        this.number = number;%0A    %7D%0A%0A    @Override%0A    public String toString() %7B%0A        return %22PhoneNumber%7B%22 +%0A                %22description='%22 + description + '%5C'' +%0A                %22, number=%22 + number +%0A                '%7D';%0A    %7D%0A%7D%0A

Add serilization example