code: public static byte[] serialize(Object object) {
  		
  		byte[] result = null;
  		
  		if (object == null) {
  			return new byte[0];
  		}
  		try {
  			ByteArrayOutputStream byteStream = new ByteArrayOutputStream(128);
  			try  {
  				if (!(object instanceof Serializable)) {
  					throw new IllegalArgumentException(SerializeUtils.class.getSimpleName() + " requires a Serializable payload " +
  							"but received an object of type [" + object.getClass().getName() + "]");
  				}
  				ObjectOutputStream objectOutputStream = new ObjectOutputStream(byteStream);
  				objectOutputStream.writeObject(object);
  				objectOutputStream.flush();
  				result =  byteStream.toByteArray();
  			}
  			catch (Throwable ex) {
  				throw new Exception("Failed to serialize", ex);
  			}
  		} catch (Exception ex) {
  			logger.error("Failed to serialize",ex);
  		}
  		return result;
  	}
docs: 序列化
  @param object
  @return