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

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

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

RandomAccessFile.readByte介绍

[英]Reads a signed 8-bit value from this file. This method reads a byte from the file. If the byte read is b, where 0 <= b <= 255, then the result is:

(byte)(b)

This method blocks until the byte is read, the end of the stream is detected, or an exception is thrown.
[中]从该文件中读取有符号的8位值。此方法从文件中读取一个字节。如果字节读取为b,其中0 <= b <= 255,则结果为:
(byte)(b)
此方法会一直阻塞,直到读取字节、检测到流结束或引发异常为止。

代码示例

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

void read() throws IOException {
 raf.seek(offset);
 version = raf.readByte();
 type = raf.readByte();
 nbits = raf.readByte();
 type_class = raf.readByte();
}

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

void read() throws IOException {
 raf.seek(offset);
 version = raf.readByte();
 type = raf.readByte();
 nbits = raf.readByte();
 type_class = raf.readByte();
}

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

Record71() throws IOException {
  location = raf.readByte();
  raf.readByte(); // skip a byte
  messtype = raf.readByte();
  index = raf.readShort();
  address = h5.readOffset();
 }
}

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

Record71() throws IOException {
  location = raf.readByte();
  raf.readByte(); // skip a byte
  messtype = raf.readByte();
  index = raf.readShort();
  address = h5.readOffset();
 }
}

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

void read() throws IOException {
 int version = raf.readByte();
 refCount = raf.readInt();
 if (debug1) {
  log.debug("   ObjectReferenceCount={}", refCount);
 }
}

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

void read() throws IOException {
 byte version = raf.readByte();
 byte nfilters = raf.readByte();
 if (version == 1) raf.skipBytes(6);
 filters = new Filter[nfilters];
 for (int i = 0; i < nfilters; i++)
  filters[i] = new Filter(version);
 if (debug1) debugOut.println("   MessageFilter version=" + version + this);
}

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

void read() throws IOException {
 int version = raf.readByte();
 refCount = raf.readInt();
 if (debug1) debugOut.println("   ObjectReferenceCount=" + refCount);
}

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

void read() throws IOException {
 byte version = raf.readByte();
 byte nfilters = raf.readByte();
 if (version == 1) raf.skipBytes(6);
 filters = new Filter[nfilters];
 for (int i = 0; i < nfilters; i++)
  filters[i] = new Filter(version);
 if (debug1) debugOut.println("   MessageFilter version=" + version + this);
}

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

void read() throws IOException {
 byte version = raf.readByte();
 byte nfilters = raf.readByte();
 if (version == 1) raf.skipBytes(6);
 filters = new Filter[nfilters];
 for (int i = 0; i < nfilters; i++)
  filters[i] = new Filter(version);
 if (debug1) {
  log.debug("   MessageFilter version=" + version + this);
 }
}

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

private int readVariableSize(int size) throws IOException {
 long vv;
 if (size == 1) {
  return raf.readByte();
 } else if (size == 2) {
  return raf.readShort();
 } else if (size == 4) {
  return raf.readInt();
 }
 throw new IllegalArgumentException("Dont support int size == " + size);
}

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

private int readVariableSize(int size) throws IOException {
 long vv;
 if (size == 1) {
  return raf.readByte();
 } else if (size == 2) {
  return raf.readShort();
 } else if (size == 4) {
  return raf.readInt();
 }
 throw new IllegalArgumentException("Dont support int size == "+size);
}

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

Record9() throws IOException {
  raf.read(heapId);
  flags = raf.readByte();
  creationOrder = raf.readInt();
 }
}

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

Record70() throws IOException {
  location = raf.readByte();
  refCount = raf.readInt();
  raf.readFully(id);
 }
}

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

Record9() throws IOException {
  raf.readFully(heapId);
  flags = raf.readByte();
  creationOrder = raf.readInt();
 }
}

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

void read() throws IOException {
 version = raf.readByte();
 raf.skipBytes(3); // skip byte
 secs = raf.readInt();
}

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

Record70() throws IOException {
  location = raf.readByte();
  refCount = raf.readInt();
  raf.readFully(id);
 }
}

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

Record9() throws IOException {
  raf.readFully(heapId);
  flags = raf.readByte();
  creationOrder = raf.readInt();
 }
}

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

Record8() throws IOException {
  raf.read(heapId);
  flags = raf.readByte();
  creationOrder = raf.readInt();
  nameHash = raf.readInt();
  if (debugBtree2)
   debugOut.println("  record8 creationOrder=" + creationOrder + " heapId=" + Misc.showBytes(heapId));
 }
}

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

Record8() throws IOException {
  raf.readFully(heapId);
  flags = raf.readByte();
  creationOrder = raf.readInt();
  nameHash = raf.readInt();
  if (debugBtree2)
   debugOut.println("  record8 creationOrder=" + creationOrder + " heapId=" + Misc.showBytes(heapId));
 }
}

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

Record8() throws IOException {
  raf.readFully(heapId);
  flags = raf.readByte();
  creationOrder = raf.readInt();
  nameHash = raf.readInt();
  if (debugBtree2)
   debugOut.println("  record8 creationOrder=" + creationOrder + " heapId=" + Misc.showBytes(heapId));
 }
}

相关文章