`
e_soft
  • 浏览: 46550 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

How to findout which components are not serializable in cluster env

阅读更多
private void serializableCheck(Object o, String objName) {
System.out.println("The Object is >>>"+objName);
try{
ByteArrayOutputStream out = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(out);
oos.writeObject(o);
oos.close();
if (out.toByteArray().length > 0){
System.out.println("SERIALIZABLE");
}else {
System.out.println("NOT SERIALIZABLE");
}
} catch (IOException io){
io.printStackTrace();
}
}
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics