Kubernetes 入门到进阶实战
download:Kubernetes 入门到进阶实战
import java.io.*;
public class SerializeDemo
{
public static void main(String [] args)
{
Employee e = new Employee();
e.name = "Reyan Ali";
e.address = "Phokka Kuan, Ambehta Peer";
e.SSN = 11122333;
e.number = 101;
try
{
FileOutputStream fileOut =
new FileOutputStream("/tmp/employee.ser");
ObjectOutputStream out = new ObjectOutputStream(fileOut);
out.writeObject(e);
out.close();
fileOut.close();
System.out.printf("Serialized data is saved in /tmp/employee.ser");
}catch(IOException i)
{
i.printStackTrace();
}
}
}
反序列化对象
下面的 DeserializeDemo 程序实例了反序列化,/tmp/employee.ser 存储了 Employee 对象。
DeserializeDemo.java 文件代码:
import java.io.*;
public class DeserializeDemo
{
public static void main(String [] args)
{
Employee e = null;
try
{
FileInputStream fileIn = new FileInputStream("/tmp/employee.ser");
ObjectInputStream in = new ObjectInputStream(fileIn);
e = (Employee) in.readObject();
in.close();
fileIn.close();
}catch(IOException i)
{
i.printStackTrace();
return;
}catch(ClassNotFoundException c)
{
System.out.println("Employee class not found");
c.printStackTrace();
return;
}
System.out.println("Deserialized Employee...");
System.out.println("Name: " + e.name);
System.out.println("Address: " + e.address);
System.out.println("SSN: " + e.SSN);
System.out.println("Number: " + e.number);
}
}
- Spring Cloud 微服务开发:入门、进阶与源码剖析 —— 12.3 Sentinel 进阶实战
- 2019最新python入门+进阶+课堂教学管理系统开发项目实战(完整)
- java入门进阶主流框架学习到架构与电商项目实战
- Spring Cloud 微服务开发:入门、进阶与源码剖析 —— 12.2 Sentinel 入门实战
- 最新Kubernetes/K8S企业容器云平台入门与进阶实战学习教程
- Kubernetes 1.3 从入门到进阶 安装篇(2)
- kubernetes入门到实战(七)资源管理和Qos
- Flutter从入门到进阶实战携程网App
- 深度学习之TensorFlow入门、原理与进阶实战 代码及样本
- 【备忘】docker入门和进阶(包含kubernetes)
- GitChat · 前端 | JavaScript 进阶之 Vue.js + Node.js 入门实战开发
- 《go语言从入门到进阶实战》知识点总结概要
- 2019最新PHP Laravel入门+进阶+全栈项目实战(完整)
- webpack4入门到进阶案例实战课程
- 第七章 多层神经网络—解决非线性问题(深度学习之TensorFlow入门、原理与进阶实战)
- Flutter从入门到进阶-实战携程网App
- Flask Web开发实战:入门、进阶与原理解析-pdf下载
- Service Mesh入门与进阶实战培训 | 北京站
- Flutter从入门到进阶-实战携程网App
- 2019最新软件测试工程师高薪就业系统全套入门+进阶+实战精品完整版