org.apache.avro.io.JsonDecoder.checkFixed()方法的使用及代码示例

x33g5p2x  于2022-01-22 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(102)

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

JsonDecoder.checkFixed介绍

暂无

代码示例

代码示例来源:origin: org.apache.avro/avro

@Override
public void skipFixed(int length) throws IOException {
 checkFixed(length);
 doSkipFixed(length);
}

代码示例来源:origin: apache/avro

@Override
public void skipFixed(int length) throws IOException {
 checkFixed(length);
 doSkipFixed(length);
}

代码示例来源:origin: apache/avro

@Override
public void readFixed(byte[] bytes, int start, int len) throws IOException {
 checkFixed(len);
 if (in.getCurrentToken() == JsonToken.VALUE_STRING) {
  byte[] result = readByteArray();
  in.nextToken();
  if (result.length != len) {
   throw new AvroTypeException("Expected fixed length " + len
     + ", but got" + result.length);
  }
  System.arraycopy(result, 0, bytes, start, len);
 } else {
  throw error("fixed");
 }
}

代码示例来源:origin: org.apache.avro/avro

@Override
public void readFixed(byte[] bytes, int start, int len) throws IOException {
 checkFixed(len);
 if (in.getCurrentToken() == JsonToken.VALUE_STRING) {
  byte[] result = readByteArray();
  in.nextToken();
  if (result.length != len) {
   throw new AvroTypeException("Expected fixed length " + len
     + ", but got" + result.length);
  }
  System.arraycopy(result, 0, bytes, start, len);
 } else {
  throw error("fixed");
 }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.avro

@Override
public void skipFixed(int length) throws IOException {
 checkFixed(length);
 doSkipFixed(length);
}

代码示例来源:origin: org.apache.hadoop/avro

@Override
public void skipFixed(int length) throws IOException {
 checkFixed(length);
 doSkipFixed(length);
}

代码示例来源:origin: com.facebook.presto.hive/hive-apache

@Override
public void skipFixed(int length) throws IOException {
 checkFixed(length);
 doSkipFixed(length);
}

代码示例来源:origin: org.apache.cassandra.deps/avro

@Override
public void skipFixed(int length) throws IOException {
 checkFixed(length);
 doSkipFixed(length);
}

代码示例来源:origin: org.apache.hadoop/avro

@Override
public void readFixed(byte[] bytes, int start, int len) throws IOException {
 checkFixed(len);
 if (in.getCurrentToken() == JsonToken.VALUE_STRING) {
  byte[] result = readByteArray();
  in.nextToken();
  if (result.length != len) {
   throw new AvroTypeException("Expected fixed length " + len
     + ", but got" + result.length);
  }
  System.arraycopy(result, 0, bytes, start, len);
 } else {
  throw error("fixed");
 }
}

代码示例来源:origin: com.facebook.presto.hive/hive-apache

@Override
public void readFixed(byte[] bytes, int start, int len) throws IOException {
 checkFixed(len);
 if (in.getCurrentToken() == JsonToken.VALUE_STRING) {
  byte[] result = readByteArray();
  in.nextToken();
  if (result.length != len) {
   throw new AvroTypeException("Expected fixed length " + len
     + ", but got" + result.length);
  }
  System.arraycopy(result, 0, bytes, start, len);
 } else {
  throw error("fixed");
 }
}

代码示例来源:origin: org.apache.cassandra.deps/avro

@Override
public void readFixed(byte[] bytes, int start, int len) throws IOException {
 checkFixed(len);
 if (in.getCurrentToken() == JsonToken.VALUE_STRING) {
  byte[] result = readByteArray();
  in.nextToken();
  if (result.length != len) {
   throw new AvroTypeException("Expected fixed length " + len
     + ", but got" + result.length);
  }
  System.arraycopy(result, 0, bytes, start, len);
 } else {
  throw error("fixed");
 }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.avro

@Override
public void readFixed(byte[] bytes, int start, int len) throws IOException {
 checkFixed(len);
 if (in.getCurrentToken() == JsonToken.VALUE_STRING) {
  byte[] result = readByteArray();
  in.nextToken();
  if (result.length != len) {
   throw new AvroTypeException("Expected fixed length " + len
     + ", but got" + result.length);
  }
  System.arraycopy(result, 0, bytes, start, len);
 } else {
  throw error("fixed");
 }
}

相关文章