co.cask.cdap.api.common.Bytes.toBoolean()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(1.0k)|赞(0)|评价(0)|浏览(83)

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

Bytes.toBoolean介绍

[英]Reverses #toBytes(boolean).
[中]反转#toBytes(布尔值)。

代码示例

代码示例来源:origin: cdapio/cdap

@Override
@Nullable
public Boolean getBoolean(byte[] column) {
 byte[] val = get(column);
 return val == null ? null : Bytes.toBoolean(columns.get(column));
}

代码示例来源:origin: cdapio/cdap

@Override
 public void run(DatasetContext context) throws Exception {
  byte[] value = table.read("completed");
  completed.set((!(value == null || value.length != 1)) && Bytes.toBoolean(value));
  table.increment(Bytes.toBytes("called"), 1L);
 }
});

代码示例来源:origin: co.cask.hydrator/core-plugins

return Bytes.toBoolean(bytesVal);
case INT:
 return Bytes.toInt(bytesVal);

代码示例来源:origin: co.cask.wrangler/wrangler-core

return ((Long) object)  > 0 ? true : false;
} else if (object instanceof byte[]) {
 return Bytes.toBoolean((byte[]) object);
} else {
 return object;

相关文章