use of org.locationtech.geowave.adapter.raster.adapter.GridCoverageWritable in project geowave by locationtech.
the class GridCoverageWritableSerializer method read.
@Override
public GridCoverageWritable read(final Kryo arg0, final Input arg1, final Class<GridCoverageWritable> arg2) {
final GridCoverageWritable gcw = new GridCoverageWritable();
final byte[] data = arg1.readBytes(arg1.readInt());
try (DataInputStream is = new DataInputStream(new ByteArrayInputStream(data))) {
gcw.readFields(is);
} catch (final IOException e) {
LOGGER.error("Cannot deserialize GridCoverageWritable", e);
return null;
}
return gcw;
}
Aggregations