@ SuppressWarnings ( "unchecked" ) public static < T > T readObject ( InputStream is ) { try { ObjectInputStream ois = new ObjectInputStream ( is ) ; T ret = ( T ) ois . readObject ( ) ; ois . close ( ) ; return ret ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } }
Reads an object from the given input stream