public void write()

in chill-java/src/main/java/com/twitter/chill/java/ArraysAsListSerializer.java [89:105]


    public void write(final Kryo kryo, final Output output, final List<?> obj) {
        try {
            final Object[] array = (Object[]) _arrayField.get(obj);
            output.writeInt(array.length, true);
            final Class<?> componentType = array.getClass().getComponentType();
            kryo.writeClass(output, componentType);
            for (final Object item : array) {
                kryo.writeClassAndObject(output, item);
            }
        } catch (final RuntimeException e) {
            // Don't eat and wrap RuntimeExceptions because the ObjectBuffer.write...
            // handles SerializationException specifically (resizing the buffer)...
            throw e;
        } catch (final Exception e) {
            throw new RuntimeException(e);
        }
    }