/** * Get the structure iterator * * @param s the Structure * @param bufferSize the buffersize * @return the data iterator * @throws java.io.IOException if problem reading data */ public StructureDataIterator getStructureIterator(Structure s, int bufferSize) throws java.io.IOException { Vinfo vinfo = (Vinfo) s.getSPobject(); return new SeqIter(vinfo); }
@Override public StructureDataIterator getStructureIterator(Structure s, int bufferSize) throws java.io.IOException { StructureDataRegexp.Vinfo vinfo = (StructureDataRegexp.Vinfo) s.getSPobject(); return new SeqIter(vinfo); }
/** * Get the structure iterator * * @param s the Structure * @param bufferSize the buffersize * @return the data iterator * @throws java.io.IOException if problem reading data */ public StructureDataIterator getStructureIterator(Structure s, int bufferSize) throws java.io.IOException { Vinfo vinfo = (Vinfo) s.getSPobject(); return new SeqIter(vinfo); }
@Override public StructureDataIterator getStructureIterator(Structure s, int bufferSize) throws java.io.IOException { StructureDataRegexp.Vinfo vinfo = (StructureDataRegexp.Vinfo) s.getSPobject(); return new SeqIter(vinfo); }
/** * Get the structure iterator * * @param s the Structure * @param bufferSize the buffersize * @return the data iterator * @throws java.io.IOException if problem reading data */ public StructureDataIterator getStructureIterator(Structure s, int bufferSize) throws java.io.IOException { Vinfo vinfo = (Vinfo) s.getSPobject(); return new SeqIter(vinfo); }
@Override public StructureDataIterator getStructureIterator(Structure s, int bufferSize) throws java.io.IOException { StructureDataRegexp.Vinfo vinfo = (StructureDataRegexp.Vinfo) s.getSPobject(); return new SeqIter(vinfo); }
@Override public StructureDataIterator getStructureIterator(Structure s, int bufferSize) throws java.io.IOException { StructureDataRegexp.Vinfo vinfo = (StructureDataRegexp.Vinfo) s.getSPobject(); if (stationId != null) return new SingleStationSeqIter(vinfo); else return new StationSeqIter(vinfo); }
@Override public StructureDataIterator getStructureIterator(Structure s, int bufferSize) throws java.io.IOException { StructureDataRegexp.Vinfo vinfo = (StructureDataRegexp.Vinfo) s.getSPobject(); if (stationId != null) return new SingleStationSeqIter(vinfo); else return new StationSeqIter(vinfo); }
@Override public StructureDataIterator getStructureIterator(Structure s, int bufferSize) throws java.io.IOException { StructureDataRegexp.Vinfo vinfo = (StructureDataRegexp.Vinfo) s.getSPobject(); if (stationId != null) return new SingleStationSeqIter(vinfo); else return new StationSeqIter(vinfo); }
@Override public int appendStructureData(Structure s, StructureData sdata) throws IOException, InvalidRangeException { Vinfo vinfo = (Vinfo) s.getSPobject(); Dimension dim = s.getDimension(0); // LOOK must be outer dim int dimid = vinfo.g4.dimHash.get(dim); SizeTByReference lenp = new SizeTByReference(); int ret = nc4.nc_inq_dimlen(vinfo.g4.grpid, dimid, lenp); if (ret != 0) throw new IOException(errMessage("nc_inq_dimlen", ret, vinfo.g4.grpid, dimid)); SizeT[] origin = new SizeT[]{lenp.getValue()}; SizeT[] shape = new SizeT[]{new SizeT(1)}; SizeT[] stride = new SizeT[]{new SizeT(1)}; //ArrayStructureBB valuesBB = IospHelper.copyToArrayBB(sdata, ByteOrder.nativeOrder()); // n4 wants native byte order // ByteBuffer bbuff = valuesBB.getByteBuffer(); ByteBuffer bbuff = makeBB(s, sdata); // write the data //ret = nc4.nc_put_vara(vinfo.g4.grpid, vinfo.varid, origin, shape, bbuff); //ret = nc4.nc_put_vars(vinfo.g4.grpid, vinfo.varid, origin, shape, stride, bbuff); ret = nc4.nc_put_vars(vinfo.g4.grpid, vinfo.varid, origin, shape, stride, bbuff.array()); if (ret != 0) throw new IOException(errMessage("appendStructureData (nc_put_vars)", ret, vinfo.g4.grpid, vinfo.varid)); return origin[0].intValue(); // recnum }
@Override public int appendStructureData(Structure s, StructureData sdata) throws IOException, InvalidRangeException { Vinfo vinfo = (Vinfo) s.getSPobject(); Dimension dim = s.getDimension(0); // LOOK must be outer dim int dimid = vinfo.g4.dimHash.get(dim); SizeTByReference lenp = new SizeTByReference(); int ret = nc4.nc_inq_dimlen(vinfo.g4.grpid, dimid, lenp); if (ret != 0) throw new IOException(errMessage("nc_inq_dimlen", ret, vinfo.g4.grpid, dimid)); SizeT[] origin = new SizeT[]{lenp.getValue()}; SizeT[] shape = new SizeT[]{new SizeT(1)}; SizeT[] stride = new SizeT[]{new SizeT(1)}; //ArrayStructureBB valuesBB = IospHelper.copyToArrayBB(sdata, ByteOrder.nativeOrder()); // n4 wants native byte order // ByteBuffer bbuff = valuesBB.getByteBuffer(); ByteBuffer bbuff = makeBB(s, sdata); // write the data //ret = nc4.nc_put_vara(vinfo.g4.grpid, vinfo.varid, origin, shape, bbuff); //ret = nc4.nc_put_vars(vinfo.g4.grpid, vinfo.varid, origin, shape, stride, bbuff); ret = nc4.nc_put_vars(vinfo.g4.grpid, vinfo.varid, origin, shape, stride, bbuff.array()); if (ret != 0) throw new IOException(errMessage("appendStructureData (nc_put_vars)", ret, vinfo.g4.grpid, vinfo.varid)); return origin[0].intValue(); // recnum }
H4header.Vinfo vinfo = (H4header.Vinfo) s.getSPobject();
H4header.Vinfo vinfo = (H4header.Vinfo) s.getSPobject();
H4header.Vinfo vinfo = (H4header.Vinfo) s.getSPobject();