本文整理汇总了Java中org.apache.avro.io.parsing.Symbol.IntCheckAction方法的典型用法代码示例。如果您正苦于以下问题:Java Symbol.IntCheckAction方法的具体用法?Java Symbol.IntCheckAction怎么用?Java Symbol.IntCheckAction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.avro.io.parsing.Symbol
的用法示例。
在下文中一共展示了Symbol.IntCheckAction方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: checkFixed
import org.apache.avro.io.parsing.Symbol; //导入方法依赖的package包/类
private void checkFixed(int size) throws IOException {
advance(Symbol.FIXED);
Symbol.IntCheckAction top = (Symbol.IntCheckAction) parser.popSymbol();
if (size != top.size) {
throw new AvroTypeException(
"Incorrect length for fixed binary: expected " +
top.size + " but received " + size + " bytes.");
}
}
示例2: writeFixed
import org.apache.avro.io.parsing.Symbol; //导入方法依赖的package包/类
@Override
public void writeFixed(byte[] bytes, int start, int len) throws IOException {
parser.advance(Symbol.FIXED);
Symbol.IntCheckAction top = (Symbol.IntCheckAction) parser.popSymbol();
if (len != top.size) {
throw new AvroTypeException(
"Incorrect length for fixed binary: expected " + top.size + " but received " + len + " bytes.");
}
writeByteArray(bytes, start, len);
}
示例3: writeFixed
import org.apache.avro.io.parsing.Symbol; //导入方法依赖的package包/类
@Override
public void writeFixed(byte[] bytes, int start, int len) throws IOException {
parser.advance(Symbol.FIXED);
Symbol.IntCheckAction top = (Symbol.IntCheckAction) parser.popSymbol();
if (len != top.size) {
throw new AvroTypeException(
"Incorrect length for fixed binary: expected " +
top.size + " but received " + len + " bytes.");
}
writeByteArray(bytes, start, len);
}
示例4: checkFixed
import org.apache.avro.io.parsing.Symbol; //导入方法依赖的package包/类
private void checkFixed(int size) throws IOException {
advance(Symbol.FIXED);
Symbol.IntCheckAction top = (Symbol.IntCheckAction) parser.popSymbol();
if (size != top.size) {
throw new AvroTypeException(
"Incorrect length for fixed binary: expected " +
top.size + " but received " + size + " bytes.");
}
}
示例5: checkFixed
import org.apache.avro.io.parsing.Symbol; //导入方法依赖的package包/类
private void checkFixed(int size) throws IOException {
advance(Symbol.FIXED);
Symbol.IntCheckAction top = (Symbol.IntCheckAction) parser.popSymbol();
if (size != top.size) {
throw new AvroTypeException(
"Incorrect length for fixed binary: expected " +
top.size + " but received " + size + " bytes.");
}
}
示例6: skipFixed
import org.apache.avro.io.parsing.Symbol; //导入方法依赖的package包/类
@Override
protected void skipFixed() throws IOException {
advance(Symbol.FIXED);
Symbol.IntCheckAction top = (Symbol.IntCheckAction) parser.popSymbol();
doSkipFixed(top.size);
}
示例7: skipFixed
import org.apache.avro.io.parsing.Symbol; //导入方法依赖的package包/类
@Override
protected void skipFixed() throws IOException {
advance(Symbol.FIXED);
Symbol.IntCheckAction top = (Symbol.IntCheckAction) parser.popSymbol();
doSkipFixed(top.size);
}
示例8: skipFixed
import org.apache.avro.io.parsing.Symbol; //导入方法依赖的package包/类
@Override
protected void skipFixed() throws IOException {
advance(Symbol.FIXED);
Symbol.IntCheckAction top = (Symbol.IntCheckAction) parser.popSymbol();
doSkipFixed(top.size);
}