@SuppressWarnings({"unchecked"}) public static <T extends Serializable>T deserializeJdk(byte[] bytes) throws IOException, ClassNotFoundException {
  ObjectInputStream in=null;
  try {
    in=new ObjectInputStream(new ByteArrayInputStream(bytes));
    return (T)in.readObject();
  }
  finally {
    close(in);
  }
}

@ SuppressWarnings ( { "unchecked" } ) public static < T extends Serializable > T deserializeJdk ( byte [ ] bytes ) throws IOException , ClassNotFoundException { ObjectInputStream in = null ; try { in = new ObjectInputStream ( new ByteArrayInputStream ( bytes ) ) ; return ( T ) in . readObject ( ) ; } finally { close ( in ) ; } }
deserializes passed in bytes using provided class loader .
