Bytes.java 文件源码

java
阅读 29 收藏 0 点赞 0 评论 0

项目:ditb 作者:
/**
 * Read byte-array written with a WritableableUtils.vint prefix.
 * @param in Input to read from.
 * @return byte array read off <code>in</code>
 * @throws IOException e
 */
public static byte [] readByteArray(final DataInput in)
throws IOException {
  int len = WritableUtils.readVInt(in);
  if (len < 0) {
    throw new NegativeArraySizeException(Integer.toString(len));
  }
  byte [] result = new byte[len];
  in.readFully(result, 0, len);
  return result;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号