前两天发在JavaSE区发现没人解答,不知道是不是没有被大神们注意到,再发一帖吧。代码段来自AOSP源码android.os.Parcel类:
    /**
     * Write a byte array into the parcel at the current {@link #dataPosition},
     * growing {@link #dataCapacity} if needed.
     * @param b Bytes to place into the parcel.
     * @param offset Index of first byte to be written.
     * @param len Number of bytes to write.
     */
    public final void writeByteArray(byte[] b, int offset, int len) {
        if (b == null) {
            writeInt(-1);
            return;
        }
        Arrays.checkOffsetAndCount(b.length, offset, len);
        nativeWriteByteArray(mNativePtr, b, offset, len);
    }Arrays类引用自java.util.Arrayscompile报错,楼主查找了下本地jdk1.7及jdk1.8中的java.util.Arrays类均未找到方法Arrays.checkOffsetAndCount(int, int, int)麻烦大神指点下, 不胜感激。