package com.vaadin.tests;
import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import junit.framework.TestCase;
-import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream;
import com.vaadin.data.Item;
import com.vaadin.data.util.IndexedContainer;
import com.vaadin.data.util.MethodProperty;
throws IOException, ClassNotFoundException {
// Serialize and deserialize
- ByteOutputStream bs = new ByteOutputStream();
+ ByteArrayOutputStream bs = new ByteArrayOutputStream();
ObjectOutputStream out = new ObjectOutputStream(bs);
out.writeObject(s);
- byte[] data = bs.getBytes();
+ byte[] data = bs.toByteArray();
ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(
data));
Serializable s2 = (Serializable) in.readObject();