@ SuppressWarnings ( "unchecked" ) @ Override public T decode ( final byte [ ] buf ) { try ( final ObjectInputStream in = new ObjectInputStream ( new ByteArrayInputStream ( buf ) ) ) { return ( T ) in . readObject ( ) ; } catch ( final ClassNotFoundException | IOException ex ) { throw new RemoteRuntimeException ( ex ) ; } }
Decodes an object from the bytes .