public BlockOrientation getOrientation() {
        IntBuffer orientationBuf = IntBuffer.allocate(1);
        IntBuffer writingDirectionBuf = IntBuffer.allocate(1);
        IntBuffer textlineOrderBuf = IntBuffer.allocate(1);
        FloatBuffer deskewAngleBuf = FloatBuffer.allocate(1);
        
        iterator.getOrientation(orientationBuf, writingDirectionBuf, textlineOrderBuf, deskewAngleBuf);
        
        int value = orientationBuf.get();
        Orientation orientation = Orientation.UP;
        for (Orientation o: Orientation.values()) {
            if (value == o.value) {
                orientation = o;
                break;
            }
        }
        
        value = writingDirectionBuf.get();
        WritingDirection direction = WritingDirection.LEFT_TO_RIGHT;
        for (WritingDirection d: WritingDirection.values()) {
            if (value == d.value) {
                direction = d;
                break;
            }
        }
        
        value = textlineOrderBuf.get();
        TextlineOrder order = TextlineOrder.TOP_TO_BOTTOM;
        for (TextlineOrder o: TextlineOrder.values()) {
            if (value == o.value) {
                order = o;
                break;
            }
        }
        
        return new BlockOrientation(orientation, direction, order, deskewAngleBuf.get());
    }