public static <T> T readKryo(File file) {
    try {
      byte[] bytes = CompressionUtil.decodeBZRaw(Files.readAllBytes(file.toPath()));
      Input input = new Input(buffer.get(), 0, bytes.length);
      return (T) new KryoReflectionFactorySupport().readClassAndObject(input);
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
  }
public static < T > T readKryo ( File file ) { try { byte [ ] bytes = CompressionUtil . decodeBZRaw ( Files . readAllBytes ( file . toPath ( ) ) ) ; Input input = new Input ( buffer . get ( ) , 0 , bytes . length ) ; return ( T ) new KryoReflectionFactorySupport ( ) . readClassAndObject ( input ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } }
Read kryo t.

@param <T>  the type parameter
@param file the file
@return the t