code: public Serializable deserializeFromBytes(final byte[] bytes) {
          Serializable o = null;
          try (final ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
              final ObjectInputStream ois = new RestrictedObjectInputStream(bais, this.trustedPackages, this.trustedClasses)) {
              o = (Serializable) ois.readObject();
          } catch (final IOException | ClassNotFoundException e) {
              logger.warn("cannot Java deserialize object", e);
          }
          return o;
      }
docs: Deserialize a bytes array into a Java object.
  
  @param bytes the serialized object as a bytes array
  @return the deserialized Java object