コード例 #1
0
 /**
  * @param bytes Bytes to unmarshal.
  * @param ldr Class loader.
  * @param <T> Type to unmarshal.
  * @return Unmarshalled value.
  * @throws GridException If unmarshal failed.
  */
 @SuppressWarnings({"unchecked", "TypeMayBeWeakened"})
 private <T> T unmarshal(GridSwapByteArray bytes, ClassLoader ldr) throws GridException {
   return (T)
       U.unmarshal(
           cctx.marshaller(),
           new ByteArrayInputStream(bytes.getArray(), bytes.getOffset(), bytes.getLength()),
           ldr);
 }
コード例 #2
0
 /**
  * @param bytes Bytes to unmarshal.
  * @param ldr Class loader.
  * @param <T> Type to unmarshal.
  * @return Unmarshalled value.
  * @throws GridException If unmarshal failed.
  */
 @SuppressWarnings({"unchecked", "TypeMayBeWeakened"})
 private <T> T unmarshal(byte[] bytes, ClassLoader ldr) throws GridException {
   return (T) U.unmarshal(cctx.marshaller(), new ByteArrayInputStream(bytes), ldr);
 }