public BitSet read()

in chill-java/src/main/java/com/twitter/chill/java/BitSetSerializer.java [84:115]


    public BitSet read(Kryo kryo, Input input, Class<BitSet> bitSetClass) {
        int len = input.readInt(true);
        long[] target = new long[len];

        for(int i = 0; i < len; i++) {
            target[i] = input.readLong();
        }

        BitSet ret = null;

        try {
            ret = bitSetConstructor.newInstance(target);
        } catch (InstantiationException e) {
            throw new KryoException("Exception thrown while creating new instance BitSetConstructor", e);
        } catch (IllegalAccessException e) {
            throw new KryoException("Exception thrown while creating new instance of BitSetConstructor", e);
        } catch (InvocationTargetException e) {
            throw new KryoException("Exception thrown while creating new instance of BitSetConstructor", e);
        } catch (IllegalArgumentException e) {
            throw new KryoException("Exception thrown while creating new instance of BitSetConstructor", e);
        }
        try {
            recalculateWordsInUseMethod.invoke(ret);
        } catch (InvocationTargetException e) {
            throw new KryoException("Exception thrown while invoking recalculateWordsInUseMethod", e);
        } catch (IllegalAccessException e) {
            throw new KryoException("Exception thrown while invoking recalculateWordsInUseMethod", e);
        } catch (IllegalArgumentException e) {
            throw new KryoException("Exception thrown while invoking recalculateWordsInUseMethod", e);
        }
        return ret;
    }