public ucar.nc2.stream.NcStreamProto.Data buildPartial() { ucar.nc2.stream.NcStreamProto.Data result = new ucar.nc2.stream.NcStreamProto.Data(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0;
byte[] dp = new byte[psize]; raf.read(dp); NcStreamProto.Data dproto = NcStreamProto.Data.parseFrom(dp); Variable v = ncfile.findVariable(dproto.getVarName()); if (v == null) { System.out.printf(" ERR cant find var %s%n%s%n", dproto.getVarName(), dproto); continue; if (!dproto.getVdata()) { // regular data int dsize = readVInt(raf); DataStorage dataStorage = new DataStorage(); dataStorage.size = dsize; dataStorage.filePos = raf.getFilePointer(); dataStorage.section = NcStream.decodeSection(dproto.getSection()); dataStorage.nelems = (int) dataStorage.section.computeSize(); dataStorage.isDeflate = dproto.getCompress() == NcStreamProto.Compress.DEFLATE; if (dataStorage.isDeflate) dataStorage.uncompressedLen = dproto.getUncompressedSize(); if (ncm != null) ncm.add(new NcsMess(dataStorage.filePos, dsize, dataStorage)); storage.add(dataStorage); dataStorage.nelems = nelems; dataStorage.size = totalSize; dataStorage.section = NcStream.decodeSection(dproto.getSection()); if (ncm != null) ncm.add(new NcsMess(dataStorage.filePos, totalSize, dataStorage)); storage.add(dataStorage);
byte[] dp = new byte[psize]; raf.readFully(dp); NcStreamProto.Data dproto = NcStreamProto.Data.parseFrom(dp); Variable v = ncfile.findVariable(dproto.getVarName()); if (v == null) { System.out.printf(" ERR cant find var %s%n%s%n", dproto.getVarName(), dproto); if (dproto.getDataType() == NcStreamProto.DataType.STRUCTURE) { pos = raf.getFilePointer(); msize = readVInt(raf); storage.add(dataStorage); } else if (dproto.getVdata()) { DataStorage dataStorage = new DataStorage(0, raf.getFilePointer(), dproto); int nelems = readVInt(raf);
byte[] dp = new byte[psize]; raf.readFully(dp); NcStreamProto.Data dproto = NcStreamProto.Data.parseFrom(dp); Variable v = ncfile.findVariable(dproto.getVarName()); if (v == null) { System.out.printf(" ERR cant find var %s%n%s%n", dproto.getVarName(), dproto); continue; if (!dproto.getVdata()) { // regular data int dsize = readVInt(raf); DataStorage dataStorage = new DataStorage(); dataStorage.size = dsize; dataStorage.filePos = raf.getFilePointer(); dataStorage.section = NcStream.decodeSection(dproto.getSection()); dataStorage.nelems = (int) dataStorage.section.computeSize(); dataStorage.isDeflate = dproto.getCompress() == NcStreamProto.Compress.DEFLATE; if (dataStorage.isDeflate) dataStorage.uncompressedLen = dproto.getUncompressedSize(); if (ncm != null) ncm.add(new NcsMess(dataStorage.filePos, dsize, dataStorage)); storage.add(dataStorage); dataStorage.nelems = nelems; dataStorage.size = totalSize; dataStorage.section = NcStream.decodeSection(dproto.getSection()); if (ncm != null) ncm.add(new NcsMess(dataStorage.filePos, totalSize, dataStorage)); storage.add(dataStorage);
byte[] dp = new byte[psize]; NcStream.readFully(is, dp); NcStreamProto.Data dproto = NcStreamProto.Data.parseFrom(dp); DataType dataType = NcStream.convertDataType(dproto.getDataType()); Section section = (dataType == DataType.SEQUENCE) ? new Section() : NcStream.decodeSection(dproto.getSection()); ii.setObjectNext(new String(sb, CDM.utf8Charset)); return new DataResult(dproto.getVarName(), data); return new DataResult(dproto.getVarName(), data); Structure s = (Structure) ncfile.findVariable(dproto.getVarName()); StructureMembers members = s.makeStructureMembers(); if (dproto.getVersion() == 0) { return new DataResult(dproto.getVarName(), data); return new DataResult(dproto.getVarName(), data); NcStreamProto.Compress compress = dproto.getCompress(); int uncompressedSize = dproto.getUncompressedSize(); if (compress == NcStreamProto.Compress.DEFLATE) { ByteArrayInputStream bin = new ByteArrayInputStream(datab); return new DataResult(dproto.getVarName(), data);
byte[] dp = new byte[psize]; NcStream.readFully(is, dp); NcStreamProto.Data dproto = NcStreamProto.Data.parseFrom(dp); DataType dataType = NcStream.decodeDataType(dproto.getDataType()); Section section = (dataType == DataType.SEQUENCE) ? new Section() : NcStream.decodeSection(dproto.getSection()); ii.setObjectNext( new String(sb, CDM.utf8Charset)); return new DataResult(dproto.getVarName(), section, data); ii.setObjectNext( ByteBuffer.wrap(sb)); return new DataResult(dproto.getVarName(), section, data); Structure s = (Structure) ncfile.findVariable(dproto.getVarName()); StructureMembers members = s.makeStructureMembers(); if (dproto.getVersion() == 0) { return new DataResult(dproto.getVarName(), section, data); return new DataResult(dproto.getVarName(), section, data); return new DataResult(dproto.getVarName(), section, data);
public ucar.nc2.stream.NcStreamProto.Data buildPartial() { ucar.nc2.stream.NcStreamProto.Data result = new ucar.nc2.stream.NcStreamProto.Data(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0;
byte[] dp = new byte[psize]; NcStream.readFully(is, dp); NcStreamProto.Data dproto = NcStreamProto.Data.parseFrom(dp); DataType dataType = NcStream.decodeDataType(dproto.getDataType()); Section section = (dataType == DataType.SEQUENCE) ? new Section() : NcStream.decodeSection(dproto.getSection()); ii.setObjectNext( new String(sb, CDM.utf8Charset)); return new DataResult(dproto.getVarName(), data); ii.setObjectNext( ByteBuffer.wrap(sb)); return new DataResult(dproto.getVarName(), data); Structure s = (Structure) ncfile.findVariable(dproto.getVarName()); StructureMembers members = s.makeStructureMembers(); if (dproto.getVersion() == 0) { return new DataResult(dproto.getVarName(), data); return new DataResult(dproto.getVarName(), data); return new DataResult(dproto.getVarName(), data);
if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getVarNameBytes()); .computeUInt32Size(8, uncompressedSize_); size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size;
if (!getVarNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessage.computeStringSize(1, varName_); .computeMessageSize(3, getSection());
if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getVarNameBytes()); .computeUInt32Size(8, uncompressedSize_); size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size;
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getVarNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessage.writeString(output, 1, varName_); } if (dataType_ != ucar.nc2.stream.NcStreamProto.DataType.CHAR.getNumber()) { output.writeEnum(2, dataType_); } if (section_ != null) { output.writeMessage(3, getSection()); } if (bigendPresentCase_ == 4) { output.writeBool( 4, (boolean)((java.lang.Boolean) bigendPresent_)); } if (version_ != 0) { output.writeUInt32(5, version_); } if (compress_ != ucar.nc2.stream.NcStreamProto.Compress.NONE.getNumber()) { output.writeEnum(6, compress_); } if (vdata_ != false) { output.writeBool(7, vdata_); } if (uncompressedSize_ != 0) { output.writeUInt32(8, uncompressedSize_); } }
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getVarNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeEnum(2, dataType_.getNumber()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeMessage(3, section_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBool(4, bigend_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeUInt32(5, version_); } if (((bitField0_ & 0x00000020) == 0x00000020)) { output.writeEnum(6, compress_.getNumber()); } if (((bitField0_ & 0x00000040) == 0x00000040)) { output.writeBool(7, vdata_); } if (((bitField0_ & 0x00000080) == 0x00000080)) { output.writeUInt32(8, uncompressedSize_); } getUnknownFields().writeTo(output); }
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getVarNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeEnum(2, dataType_.getNumber()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeMessage(3, section_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBool(4, bigend_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeUInt32(5, version_); } if (((bitField0_ & 0x00000020) == 0x00000020)) { output.writeEnum(6, compress_.getNumber()); } if (((bitField0_ & 0x00000040) == 0x00000040)) { output.writeBool(7, vdata_); } if (((bitField0_ & 0x00000080) == 0x00000080)) { output.writeUInt32(8, uncompressedSize_); } getUnknownFields().writeTo(output); }
public Builder mergeFrom(ucar.nc2.stream.NcStreamProto.Data other) { if (other == ucar.nc2.stream.NcStreamProto.Data.getDefaultInstance()) return this; if (!other.getVarName().isEmpty()) { varName_ = other.varName_; onChanged(); setDataTypeValue(other.getDataTypeValue()); if (other.hasSection()) { mergeSection(other.getSection()); if (other.getVersion() != 0) { setVersion(other.getVersion()); setCompressValue(other.getCompressValue()); if (other.getVdata() != false) { setVdata(other.getVdata()); if (other.getUncompressedSize() != 0) { setUncompressedSize(other.getUncompressedSize()); switch (other.getBigendPresentCase()) { case BIGEND: { setBigend(other.getBigend()); break;
public Builder mergeFrom(ucar.nc2.stream.NcStreamProto.Data other) { if (other == ucar.nc2.stream.NcStreamProto.Data.getDefaultInstance()) return this; if (other.hasVarName()) { bitField0_ |= 0x00000001; varName_ = other.varName_; onChanged(); if (other.hasDataType()) { setDataType(other.getDataType()); if (other.hasSection()) { mergeSection(other.getSection()); if (other.hasBigend()) { setBigend(other.getBigend()); if (other.hasVersion()) { setVersion(other.getVersion()); if (other.hasCompress()) { setCompress(other.getCompress()); if (other.hasVdata()) { setVdata(other.getVdata()); if (other.hasUncompressedSize()) { setUncompressedSize(other.getUncompressedSize()); this.mergeUnknownFields(other.getUnknownFields()); return this;
public Builder mergeFrom(ucar.nc2.stream.NcStreamProto.Data other) { if (other == ucar.nc2.stream.NcStreamProto.Data.getDefaultInstance()) return this; if (other.hasVarName()) { bitField0_ |= 0x00000001; varName_ = other.varName_; onChanged(); if (other.hasDataType()) { setDataType(other.getDataType()); if (other.hasSection()) { mergeSection(other.getSection()); if (other.hasBigend()) { setBigend(other.getBigend()); if (other.hasVersion()) { setVersion(other.getVersion()); if (other.hasCompress()) { setCompress(other.getCompress()); if (other.hasVdata()) { setVdata(other.getVdata()); if (other.hasUncompressedSize()) { setUncompressedSize(other.getUncompressedSize()); this.mergeUnknownFields(other.getUnknownFields()); return this;
public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; if (!hasVarName()) { memoizedIsInitialized = 0; return false; } if (!hasDataType()) { memoizedIsInitialized = 0; return false; } if (hasSection()) { if (!getSection().isInitialized()) { memoizedIsInitialized = 0; return false; } } memoizedIsInitialized = 1; return true; }
public ucar.nc2.stream.NcStreamProto.Data buildPartial() { ucar.nc2.stream.NcStreamProto.Data result = new ucar.nc2.stream.NcStreamProto.Data(this); result.varName_ = varName_; result.dataType_ = dataType_; if (sectionBuilder_ == null) { result.section_ = section_; } else { result.section_ = sectionBuilder_.build(); } if (bigendPresentCase_ == 4) { result.bigendPresent_ = bigendPresent_; } result.version_ = version_; result.compress_ = compress_; result.vdata_ = vdata_; result.uncompressedSize_ = uncompressedSize_; result.bigendPresentCase_ = bigendPresentCase_; onBuilt(); return result; }
public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; if (!hasVarName()) { memoizedIsInitialized = 0; return false; } if (!hasDataType()) { memoizedIsInitialized = 0; return false; } if (hasSection()) { if (!getSection().isInitialized()) { memoizedIsInitialized = 0; return false; } } memoizedIsInitialized = 1; return true; }