本文整理汇总了Java中org.apache.flink.core.memory.DataInputView.readChar方法的典型用法代码示例。如果您正苦于以下问题:Java DataInputView.readChar方法的具体用法?Java DataInputView.readChar怎么用?Java DataInputView.readChar使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.flink.core.memory.DataInputView
的用法示例。
在下文中一共展示了DataInputView.readChar方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: deserialize
import org.apache.flink.core.memory.DataInputView; //导入方法依赖的package包/类
@Override
public char[] deserialize(DataInputView source) throws IOException {
final int len = source.readInt();
char[] result = new char[len];
for (int i = 0; i < len; i++) {
result[i] = source.readChar();
}
return result;
}
示例2: compareSerialized
import org.apache.flink.core.memory.DataInputView; //导入方法依赖的package包/类
@Override
public int compareSerialized(DataInputView firstSource, DataInputView secondSource) throws IOException {
char c1 = firstSource.readChar();
char c2 = secondSource.readChar();
int comp = (c1 < c2 ? -1 : (c1 == c2 ? 0 : 1));
return ascendingComparison ? comp : -comp;
}
示例3: read
import org.apache.flink.core.memory.DataInputView; //导入方法依赖的package包/类
@Override
public void read(DataInputView in) throws IOException {
position = in.readInt();
mark = 0;
ensureCapacity(position);
for (int i = 0; i < position; i++) {
data[i] = in.readChar();
}
}
示例4: read
import org.apache.flink.core.memory.DataInputView; //导入方法依赖的package包/类
@Override
public void read(DataInputView in) throws IOException {
this.value = in.readChar();
}