A simpler option could be to serialize the data to a temp OutputStream
instead of checking instanceof Serializable.

Reply via email to