static byte[] toByteArray(ByteArrayOutputStream baos) { ret baos == null ? null : baos.toByteArray(); }