/** * Create a new Array using the given IndexArray and backing store. used for sections. Trusted * package private. * * @param ima use this IndexArray as the index * @param data use this as the backing store */ ArrayShort(Index ima, short[] data) { super(ima); /* replace by something better if (ima.getSize() != data.length) throw new IllegalArgumentException("bad data length"); */ if (data != null) storage = data; else storage = new short[(int) ima.getSize()]; }
/** * 获取文件长度的智能可读字符串形式。 * * @return 文件长度的字符串表示 */ public String sizeString() { return FileInfo.sizeString(Index.getSize(mIndex)); }
/** * 获取文件以字节为单位表示的文件长度。 * * @return 文件长度 */ public long size() { return Index.getSize(mIndex); }