java.io.ByteArrayOutputStream + ObjectOutputStream全写到java.io.ByteArrayOutputStream,再使用java.io.ByteArrayOutputStream.toByteArray()