ucar.unidata.io.RandomAccessFile.readStringMax()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.1k)|赞(0)|评价(0)|浏览(96)

本文整理了Java中ucar.unidata.io.RandomAccessFile.readStringMax方法的一些代码示例,展示了RandomAccessFile.readStringMax的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RandomAccessFile.readStringMax方法的具体详情如下:
包路径:ucar.unidata.io.RandomAccessFile
类名称:RandomAccessFile
方法名:readStringMax

RandomAccessFile.readStringMax介绍

[英]Read a String of max length, zero terminate.
[中]读取最大长度为零的字符串。

代码示例

代码示例来源:origin: edu.ucar/cdm

void read() throws IOException {
 raf.seek(offset);
 text = raf.readStringMax(length);
}

代码示例来源:origin: Unidata/thredds

protected void read() throws IOException {
 raf.seek(offset);
 text = raf.readStringMax(length);
}

代码示例来源:origin: edu.ucar/cdm

void read() throws IOException {
 raf.seek(offset);
 obj_tagno = raf.readShort();
 obj_refno = raf.readShort();
 text = raf.readStringMax(length - 4).trim();
}

代码示例来源:origin: Unidata/thredds

protected void read() throws IOException {
 raf.seek(offset);
 obj_tagno = raf.readShort();
 obj_refno = raf.readShort();
 text = raf.readStringMax(length - 4).trim();
}

代码示例来源:origin: edu.ucar/cdm

void read() throws IOException {
 raf.seek(offset);
 major = raf.readInt();
 minor = raf.readInt();
 release = raf.readInt();
 name = raf.readStringMax(length - 12);
}

代码示例来源:origin: Unidata/thredds

protected void read() throws IOException {
 raf.seek(offset);
 major = raf.readInt();
 minor = raf.readInt();
 release = raf.readInt();
 name = raf.readStringMax(length - 12);
}

代码示例来源:origin: edu.ucar/cdm

void read() throws IOException {
 raf.seek(offset);
 nelems = raf.readShort();
 elem_tag = new short[nelems];
 for (int i = 0; i < nelems; i++)
  elem_tag[i] = raf.readShort();
 elem_ref = new short[nelems];
 for (int i = 0; i < nelems; i++)
  elem_ref[i] = raf.readShort();
 short len = raf.readShort();
 name = raf.readStringMax(len);
 len = raf.readShort();
 className = raf.readStringMax(len);
 extag = raf.readShort();
 exref = raf.readShort();
 version = raf.readShort();
}

代码示例来源:origin: Unidata/thredds

protected void read() throws IOException {
 raf.seek(offset);
 nelems = raf.readShort();
 elem_tag = new short[nelems];
 for (int i = 0; i < nelems; i++)
  elem_tag[i] = raf.readShort();
 elem_ref = new short[nelems];
 for (int i = 0; i < nelems; i++)
  elem_ref[i] = raf.readShort();
 short len = raf.readShort();
 name = raf.readStringMax(len);
 len = raf.readShort();
 className = raf.readStringMax(len);
 extag = raf.readShort();
 exref = raf.readShort();
 version = raf.readShort();
}

代码示例来源:origin: edu.ucar/cdm

for (int i = 0; i < nfields; i++) {
 short len = raf.readShort();
 fld_name[i] = raf.readStringMax(len);
name = raf.readStringMax(len);
className = raf.readStringMax(len);

代码示例来源:origin: Unidata/thredds

for (int i = 0; i < nfields; i++) {
 short len = raf.readShort();
 fld_name[i] = raf.readStringMax(len);
name = raf.readStringMax(len);
className = raf.readStringMax(len);

代码示例来源:origin: Unidata/thredds

case 4:
 if (nelems == 1)
  att = new Attribute(name, raf.readStringMax(size));
 else {
  String[] vals = new String[nelems];
  for (int i = 0; i < nelems; i++)
   vals[i] = raf.readStringMax(size);
  att = new Attribute(name, Array.factory(DataType.STRING, new int[]{nelems}, vals));

代码示例来源:origin: edu.ucar/cdm

case 4:
 if (nelems == 1)
  att = new Attribute(name, raf.readStringMax(size));
 else {
  String[] vals = new String[nelems];
  for (int i = 0; i < nelems; i++)
   vals[i] = raf.readStringMax(size);
  att = new Attribute(name, Array.factory(DataType.STRING.getPrimitiveClassType(), new int[]{nelems}, vals));

相关文章