code: public static <T> T deserialize(final InputStream inputStream) {
          Validate.isTrue(inputStream != null, "The InputStream must not be null");
          try (ObjectInputStream in = new ObjectInputStream(inputStream)) {
              @SuppressWarnings("unchecked")
              final T obj = (T) in.readObject();
              return obj;
          } catch (final ClassNotFoundException | IOException ex) {
              throw new SerializationException(ex);
          }
      }
docs: <p>
  Deserializes an {@code Object} from the specified stream.
  </p>
  
  <p>
  The stream will be closed once the object is written. This avoids the need for a finally clause, and maybe also
  exception handling, in the application code.
  </p>
  
  <p>
  The stream passed in is not buffered internally within this method. This is the responsibility of your
  application if desired.
  </p>
  
  <p>
  If the call site incorrectly types the return value, a {@link ClassCastException} is thrown from the call site.
  Without Generics in this declaration, the call site must type cast and can cause the same ClassCastException.
  Note that in both cases, the ClassCastException is in the call site, not in this method.
  </p>
  
  @param <T>  the object type to be deserialized
  @param inputStream
  the serialized object input stream, must not be null
  @return the deserialized object
  @throws IllegalArgumentException
  if {@code inputStream} is {@code null}
  @throws SerializationException
  (runtime) if the serialization fails