public static AllocationShape buildAllocationShape(DataBuffer buffer) {
        AllocationShape shape = new AllocationShape();
        shape.setDataType(buffer.dataType());
        shape.setLength(buffer.length());

        return shape;
    }
public static AllocationShape buildAllocationShape ( DataBuffer buffer ) { AllocationShape shape = new AllocationShape ( ) ; shape . setDataType ( buffer . dataType ( ) ) ; shape . setLength ( buffer . length ( ) ) ; return shape ; }
This method returns AllocationShape for the whole DataBuffer.

@param buffer
@return