Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
paleolimbot committed Apr 28, 2024
1 parent 217c603 commit 2643764
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/main/java/org/geoarrow/core/ArrayData.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package org.geoarrow.core;

import java.nio.Buffer;

public class ArrayData {

public ArrayData(DataType dataType, Buffer[] buffers) {
if (buffers.length == 0) {
throw new IllegalArgumentException("Can't create GeoArrow Array with zero buffers");
}

this.dataType = dataType;
this.buffers = buffers;
}

public DataType getDataType() {
return dataType;
}

public Buffer getBuffer(int i) {
return buffers[i];
}

public int numBuffers() {
return buffers.length;
}

private DataType dataType;
private Buffer[] buffers;
}

0 comments on commit 2643764

Please sign in to comment.