@Override
  public int read(byte[] bytes, int offset, int length) throws IOException {
    if (bytes == null) {
      throw new NullPointerException();
    } else if (offset < 0 || length < 0 || length > bytes.length - offset) {
      throw new IndexOutOfBoundsException();
    } else if (length == 0) {
      return 0;
    }
    if (position >= streamSize) {
      return -1;
    }
    int count = (int) Math.min(length, streamSize - position);
    Arrays.fill(bytes, offset, offset + count, (byte) 0);
    position += count;
    return count;
  }
Returns 'size' number of zero bytes when read from.
@param size The number of zero bytes to be returned.
@throws IOException
ambry-utils/src/main/java/com/github/ambry/utils/ZeroBytesInputStream.java