public void test_writeObject_java_beans_beancontext_BeanContextSupport() throws PropertyVetoException{
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
XMLEncoder encoder = new XMLEncoder(new BufferedOutputStream(
byteArrayOutputStream));
BeanContextSupport support = new BeanContextSupport();
encoder.writeObject(support);
encoder.close();
DataInputStream stream = new DataInputStream(new ByteArrayInputStream(
byteArrayOutputStream.toByteArray()));
XMLDecoder decoder = new XMLDecoder(stream);
BeanContextSupport aSupport = (BeanContextSupport) decoder.readObject();
assertEquals(Locale.getDefault(), aSupport.getLocale());
}
PersistenceDelegateTest.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:cn1
作者:
评论列表
文章目录