code: @SuppressWarnings("unchecked")
      public static <T> T deserialize(final byte[] data) {
          if (data == null) {
              return null;
          }
          try (final ByteArrayInputStream bais = new ByteArrayInputStream(data)) {
              final ObjectInputStream in = new ObjectInputStream(bais);
              return (T) in.readObject();
          } catch (final ClassNotFoundException ex) {
              throw new RuntimeException(ex);
          } catch (final IOException ex) {
              throw new RuntimeException(ex);
          }
      }
docs: Deserializes a byte array to an object. A <code>null</code> argument returns <code>null</code>.
  
  @param data
  Byte array to deserialize or <code>null</code>.
  
  @return Object created from data or <code>null</code>.
  
  @param <T>
  Type of returned data.