Java Code Examples for org.apache.flink.core.memory.DataInputView#readChar()

The following examples show how to use org.apache.flink.core.memory.DataInputView#readChar() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CharComparator.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@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; 
}
 
Example 2
Source File: CharValueArray.java    From flink with Apache License 2.0 5 votes vote down vote up
@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();
	}
}
 
Example 3
Source File: CharComparator.java    From flink with Apache License 2.0 5 votes vote down vote up
@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; 
}
 
Example 4
Source File: CharPrimitiveArraySerializer.java    From flink with Apache License 2.0 5 votes vote down vote up
@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;
}
 
Example 5
Source File: CharValueArray.java    From flink with Apache License 2.0 5 votes vote down vote up
@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();
	}
}
 
Example 6
Source File: CharComparator.java    From flink with Apache License 2.0 5 votes vote down vote up
@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; 
}
 
Example 7
Source File: CharPrimitiveArraySerializer.java    From flink with Apache License 2.0 5 votes vote down vote up
@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;
}
 
Example 8
Source File: CharValueArray.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@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();
	}
}
 
Example 9
Source File: CharPrimitiveArraySerializer.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@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;
}
 
Example 10
Source File: CharSerializer.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public Character deserialize(DataInputView source) throws IOException {
	return source.readChar();
}
 
Example 11
Source File: CharValue.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public void read(DataInputView in) throws IOException {
	this.value = in.readChar();
}
 
Example 12
Source File: CharType.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public void read(DataInputView in) throws IOException {
	this.value = in.readChar();
}
 
Example 13
Source File: CharType.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
@Override
public void read(DataInputView in) throws IOException {
	this.value = in.readChar();
}
 
Example 14
Source File: CharValue.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
@Override
public void read(DataInputView in) throws IOException {
	this.value = in.readChar();
}
 
Example 15
Source File: CharSerializer.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
@Override
public Character deserialize(DataInputView source) throws IOException {
	return source.readChar();
}
 
Example 16
Source File: CharSerializer.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public Character deserialize(DataInputView source) throws IOException {
	return source.readChar();
}
 
Example 17
Source File: CharValue.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public void read(DataInputView in) throws IOException {
	this.value = in.readChar();
}
 
Example 18
Source File: CharType.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public void read(DataInputView in) throws IOException {
	this.value = in.readChar();
}