Home
last modified time | relevance | path

Searched refs:size (Results 1 – 25 of 354) sorted by relevance

12345678910>>...15

/tools/apksig/src/test/java/com/android/apksig/util/
DDataSourceTestBase.java51 assertEquals(10, ds.size()); in testSize()
66 assertSliceEquals("", ds, ds.size() - 2, 0); in testSlice()
67 assertSliceEquals("", ds, ds.size() - 1, 0); in testSlice()
68 assertSliceEquals("", ds, ds.size(), 0); in testSlice()
71 assertSliceEquals("", slice, slice.size() - 2, 0); in testSlice()
72 assertSliceEquals("", slice, slice.size() - 1, 0); in testSlice()
73 assertSliceEquals("", slice, slice.size(), 0); in testSlice()
84 assertSliceThrowsIOOB(ds, ds.size() + 1, 0); in testSlice()
85 assertSliceThrowsIOOB(slice, slice.size() + 1, 0); in testSlice()
86 assertSliceThrowsIOOB(ds, ds.size(), 1); in testSlice()
[all …]
DDataSourceFromRAFChunkTest.java42 assertGetByteBufferEquals("abcdefg", ds, 0, (int) ds.size()); in testFileSizeChangesNotVisible()
43 assertGetByteBufferEquals("de", slice, 0, (int) slice.size()); in testFileSizeChangesNotVisible()
55 assertGetByteBufferEquals("abcdefg", ds, 0, (int) ds.size()); in testFileSizeChangesNotVisible()
56 assertGetByteBufferEquals("de", slice, 0, (int) slice.size()); in testFileSizeChangesNotVisible()
57 assertGetByteBufferThrowsIOOB(ds, 0, (int) ds.size() + 3); in testFileSizeChangesNotVisible()
58 assertFeedThrowsIOOB(ds, 0, (int) ds.size() + 3); in testFileSizeChangesNotVisible()
59 assertSliceThrowsIOOB(ds, 0, (int) ds.size() + 3); in testFileSizeChangesNotVisible()
60 assertCopyToThrowsIOOB(ds, 0, (int) ds.size() + 3); in testFileSizeChangesNotVisible()
/tools/apksig/src/main/java/com/android/apksig/internal/util/
DByteBufferDataSource.java50 public long size() { in size() method in ByteBufferDataSource
55 public ByteBuffer getByteBuffer(long offset, int size) { in getByteBuffer() argument
56 checkChunkValid(offset, size); in getByteBuffer()
60 int chunkLimit = chunkPosition + size; in getByteBuffer()
78 public void copyTo(long offset, int size, ByteBuffer dest) { in copyTo() argument
79 dest.put(getByteBuffer(offset, size)); in copyTo()
83 public void feed(long offset, long size, DataSink sink) throws IOException { in feed() argument
84 if ((size < 0) || (size > mSize)) { in feed()
85 throw new IndexOutOfBoundsException("size: " + size + ", source size: " + mSize); in feed()
87 sink.consume(getByteBuffer(offset, (int) size)); in feed()
[all …]
DByteArrayDataSink.java111 public long size() { in size() method in ByteArrayDataSink
116 public ByteBuffer getByteBuffer(long offset, int size) { in getByteBuffer() argument
117 checkChunkValid(offset, size); in getByteBuffer()
120 return ByteBuffer.wrap(mArray, (int) offset, size).slice(); in getByteBuffer()
124 public void feed(long offset, long size, DataSink sink) throws IOException { in feed() argument
125 checkChunkValid(offset, size); in feed()
128 sink.consume(mArray, (int) offset, (int) size); in feed()
132 public void copyTo(long offset, int size, ByteBuffer dest) throws IOException { in copyTo() argument
133 checkChunkValid(offset, size); in copyTo()
136 dest.put(mArray, (int) offset, size); in copyTo()
[all …]
DChainedDataSource.java34 mTotalSize = Arrays.stream(sources).mapToLong(src -> src.size()).sum(); in ChainedDataSource()
38 public long size() { in size() method in ChainedDataSource
43 public void feed(long offset, long size, DataSink sink) throws IOException { in feed() argument
44 if (offset + size > mTotalSize) { in feed()
50 if (offset >= src.size()) { in feed()
51 offset -= src.size(); in feed()
56 long remaining = src.size() - offset; in feed()
57 if (remaining >= size) { in feed()
58 src.feed(offset, size, sink); in feed()
64 size -= remaining; in feed()
[all …]
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/sign/
DZFileDataSource.java48 private final long size; field in ZFileDataSource
58 size = -1; in ZFileDataSource()
66 public ZFileDataSource(@Nonnull ZFile file, long offset, long size) { in ZFileDataSource() argument
68 Preconditions.checkArgument(size >= 0, "size < 0"); in ZFileDataSource()
71 this.size = size; in ZFileDataSource()
75 public long size() { in size() method in ZFileDataSource
76 if (size == -1) { in size()
85 return size; in size()
90 public DataSource slice(long offset, long size) { in slice() argument
91 long sourceSize = size(); in slice()
[all …]
/tools/apksig/src/test/java/com/android/apksig/internal/util/
DChainedDataSourceTest.java47 assertEquals(10, mChain.size()); in setUp()
51 for (int begin = 0; begin < mChain.size(); begin++) { in feedAllPossibleRanges()
52 for (int end = begin + 1; end < mChain.size(); end++) { in feedAllPossibleRanges()
53 int size = end - begin; in feedAllPossibleRanges() local
54 ReadableDataSink sink = DataSinks.newInMemoryDataSink(size); in feedAllPossibleRanges()
55 mChain.feed(begin, size, sink); in feedAllPossibleRanges()
58 sink.getByteBuffer(0, size)); in feedAllPossibleRanges()
65 mChain.feed(0, mChain.size() + 1, DataSinks.newInMemoryDataSink(3)); in feedMoreThanAvailable()
69 for (int begin = 0; begin < mChain.size(); begin++) { in getByteBufferFromAllPossibleRanges()
70 for (int end = begin + 1; end < mChain.size(); end++) { in getByteBufferFromAllPossibleRanges()
[all …]
/tools/tradefederation/core/src/com/android/tradefed/util/
DByteArrayList.java71 setSize(size()); in trimToSize()
109 void setSize(int size) { in setSize() argument
110 if (size < 0) { in setSize()
112 } else if (size < mCurBytes) { in setSize()
113 mCurBytes = size; in setSize()
115 mMaxBytes = size; in setSize()
117 byte[] newStorage = new byte[size]; in setSize()
212 if (otherList.size() != size()) { in equals()
215 for (int i = 0; i < size(); i++) { in equals()
235 return size() == 0; in isEmpty()
[all …]
DSimpleStats.java72 public int size() { in size() method in SimpleStats
73 return mData.size(); in size()
84 return mSum / size(); in mean()
96 if ((mData.size() & 0x1) == 1) { in median()
99 int idx = size() / 2; in median()
103 int idx = size() / 2; in median()
129 return mData.get(size() - 1); in max()
151 return Math.sqrt(ssd / size()); in stdev()
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/zip/
DFileUseMap.java55 private long size; field in FileUseMap
83 FileUseMap(long size, int minFreeSize) { in FileUseMap() argument
84 Preconditions.checkArgument(size >= 0, "size < 0"); in FileUseMap()
87 this.size = size; in FileUseMap()
92 if (size > 0) { in FileUseMap()
93 internalAdd(FileUseMapEntry.makeFree(0, size)); in FileUseMap()
132 Preconditions.checkArgument(entry.getStart() < size, "entry.getStart() >= size"); in add()
133 Preconditions.checkArgument(entry.getEnd() <= size, "entry.getEnd() > size"); in add()
264 if (end < size) { in coalesce()
299 if (size == 0) { in truncate()
[all …]
DZipField.java71 private final int size; field in ZipField
93 ZipField(int offset, int size, @Nonnull String name, ZipFieldInvariant... invariants) { in ZipField() argument
95 Preconditions.checkArgument(size == 2 || size == 4, "size != 2 && size != 4"); in ZipField()
99 this.size = size; in ZipField()
112 ZipField(int offset, int size, long expected, @Nonnull String name) { in ZipField() argument
114 Preconditions.checkArgument(size == 2 || size == 4, "size != 2 && size != 4"); in ZipField()
118 this.size = size; in ZipField()
147 if (bytes.remaining() < size) { in skip()
152 bytes.position(bytes.position() + size); in skip()
164 if (bytes.remaining() < size) { in read()
[all …]
DDataDescriptorType.java48 public int size; field in DataDescriptorType
55 DataDescriptorType(int size) { in DataDescriptorType() argument
56 this.size = size; in DataDescriptorType()
/tools/dexter/dexter/
Ddexter.cc131 for (dex::u4 i = 0; i < dexMap.size; ++i) { in PrintDexMap()
191 dex::u4 sectionByteSize = (i == dexMap.size - 1) in PrintDexMap()
196 sectionByteSize, section.size); in PrintDexMap()
203 printf(" strings : %zu\n", dex_ir->strings.size()); in PrintDexIrStats()
204 printf(" types : %zu\n", dex_ir->types.size()); in PrintDexIrStats()
205 printf(" protos : %zu\n", dex_ir->protos.size()); in PrintDexIrStats()
206 printf(" fields : %zu\n", dex_ir->fields.size()); in PrintDexIrStats()
207 printf(" encoded_fields : %zu\n", dex_ir->encoded_fields.size()); in PrintDexIrStats()
208 printf(" methods : %zu\n", dex_ir->methods.size()); in PrintDexIrStats()
209 printf(" encoded_methods : %zu\n", dex_ir->encoded_methods.size()); in PrintDexIrStats()
[all …]
/tools/loganalysis/tests/src/com/android/loganalysis/parser/
DBugreportParserFuncTest.java68 assertTrue(bugreport.getSystemProps().size() > 0); in testParse()
71 assertTrue(bugreport.getMemInfo().size() > 0); in testParse()
74 assertTrue(bugreport.getProcrank().getPids().size() > 0); in testParse()
93 bugreport.getSystemProps().size(), in testParse()
94 bugreport.getMemInfo().size(), in testParse()
95 bugreport.getProcrank().getPids().size(), in testParse()
98 bugreport.getSystemLog().getAnrs().size(), in testParse()
99 bugreport.getSystemLog().getJavaCrashes().size(), in testParse()
100 bugreport.getSystemLog().getNativeCrashes().size(), in testParse()
101 bugreport.getLastKmsg().getMiscEvents(KernelLogParser.KERNEL_RESET).size(), in testParse()
[all …]
DKernelLogParserTest.java47 assertEquals(1, kernelLog.getEvents().size()); in testParseLastKmsg()
48 assertEquals(1, kernelLog.getMiscEvents(KernelLogParser.KERNEL_RESET).size()); in testParseLastKmsg()
69 assertEquals(1, kernelLog.getEvents().size()); in testParseDmesg()
70 assertEquals(1, kernelLog.getMiscEvents(KernelLogParser.KERNEL_RESET).size()); in testParseDmesg()
91 assertEquals(1, kernelLog.getEvents().size()); in testParseLastMessage()
92 assertEquals(1, kernelLog.getMiscEvents(KernelLogParser.KERNEL_RESET).size()); in testParseLastMessage()
113 assertEquals(1, kernelLog.getEvents().size()); in testParseUnknownLastMessage()
114 assertEquals(1, kernelLog.getMiscEvents(KernelLogParser.KERNEL_RESET).size()); in testParseUnknownLastMessage()
132 assertEquals(0, kernelLog.getEvents().size()); in testParseKnownGoodLastMessage()
146 assertEquals(1, kernelLog.getEvents().size()); in testNoPreviousLogs()
[all …]
DLogcatParserTest.java52 assertEquals(1, logcat.getEvents().size()); in testParse_anr()
53 assertEquals(1, logcat.getAnrs().size()); in testParse_anr()
76 assertEquals(1, logcat.getEvents().size()); in testParse_anr_pid()
77 assertEquals(1, logcat.getAnrs().size()); in testParse_anr_pid()
99 assertEquals(1, logcat.getEvents().size()); in testParse_java_crash()
100 assertEquals(1, logcat.getJavaCrashes().size()); in testParse_java_crash()
139 assertEquals(1, logcat.getEvents().size()); in testParse_test_exception()
140 assertEquals(1, logcat.getJavaCrashes().size()); in testParse_test_exception()
176 assertEquals(1, logcat.getEvents().size()); in testParse_test_exception_with_exras()
177 assertEquals(1, logcat.getJavaCrashes().size()); in testParse_test_exception_with_exras()
[all …]
DDmesgParserTest.java85 dmesgParser.getServiceInfoItems().size()); in testEmptyDmesgLog()
98 dmesgParser.getServiceInfoItems().size()); in testCompleteDmesgLog_passedAsList()
100 dmesgParser.getStageInfoItems().size()); in testCompleteDmesgLog_passedAsList()
102 dmesgParser.getActionInfoItems().size()); in testCompleteDmesgLog_passedAsList()
118 dmesgParser.getServiceInfoItems().size()); in testCompleteDmesgLog_passedAsBufferedInput()
120 dmesgParser.getStageInfoItems().size()); in testCompleteDmesgLog_passedAsBufferedInput()
122 dmesgParser.getActionInfoItems().size()); in testCompleteDmesgLog_passedAsBufferedInput()
136 dmesgParser.getServiceInfoItems().size()); in testCompleteServiceInfo()
150 assertEquals("There should be exactly two service infos", 2, serviceInfoItems.size()); in testStartServiceInfo()
166 dmesgParser.getServiceInfoItems().size()); in testMultipleServiceInfo()
[all …]
/tools/dexter/slicer/export/slicer/
Dbuffer.h66 return size(); in Seal()
89 size_t Alloc(size_t size) { in Alloc() argument
91 Expand(size); in Alloc()
92 std::memset(buff_ + offset, 0, size); in Alloc()
96 size_t Push(const void* ptr, size_t size) { in Push() argument
98 Expand(size); in Push()
99 std::memcpy(buff_ + offset, ptr, size); in Push()
104 return Push(memView.ptr(), memView.size()); in Push()
109 return Push(a.data(), a.size() * sizeof(T)); in Push()
114 return Push(v.data(), v.size() * sizeof(T)); in Push()
[all …]
Dmemview.h31 MemView(const void* ptr, size_t size) : ptr_(ptr), size_(size) { in MemView() argument
32 assert(size > 0); in MemView()
42 size_t size() const { return size_; } in size() function
/tools/external/fat32lib/src/main/java/de/waldheinz/fs/fat/
DClusterChain.java127 public long setSize(long size) throws IOException { in setSize() argument
128 final long nrClusters = ((size + clusterSize - 1) / clusterSize); in setSize()
210 int size = Math.min(len, in readData() local
212 dest.limit(dest.position() + size); in readData()
216 offset += size; in readData()
217 len -= size; in readData()
222 int size = Math.min(clusterSize, len); in readData() local
223 dest.limit(dest.position() + size); in readData()
227 len -= size; in readData()
259 int size = Math.min(len, in writeData() local
[all …]
/tools/apksig/src/main/java/com/android/apksig/util/
DDataSource.java58 long size(); in size() method
69 void feed(long offset, long size, DataSink sink) throws IOException; in feed() argument
85 ByteBuffer getByteBuffer(long offset, int size) throws IOException; in getByteBuffer() argument
97 void copyTo(long offset, int size, ByteBuffer dest) throws IOException; in copyTo() argument
109 DataSource slice(long offset, long size); in slice() argument
/tools/loganalysis/src/com/android/loganalysis/util/
DLogTailUtil.java78 if (mRingBuffer.size() > mMaxBufferSize) { in addLine()
98 public String getLastTail(int size) { in getLastTail() argument
99 final int toIndex = mRingBuffer.size(); in getLastTail()
100 final int fromIndex = Math.max(toIndex - size, 0); in getLastTail()
126 public String getIdTail(int id, int size) { in getIdTail() argument
128 ListIterator<LogLine> li = mRingBuffer.listIterator(mRingBuffer.size()); in getIdTail()
129 while (li.hasPrevious() && tail.size() < size) { in getIdTail()
/tools/external/fat32lib/src/main/java/de/waldheinz/fs/util/
DRamDisk.java43 private final int size; field in RamDisk
77 this.size = buffer.limit(); in RamDisk()
89 public RamDisk(int size) { in RamDisk() argument
90 this(size, DEFAULT_SECTOR_SIZE); in RamDisk()
100 public RamDisk(int size, int sectorSize) { in RamDisk() argument
105 this.size = size; in RamDisk()
106 this.data = ByteBuffer.allocate(size); in RamDisk()
112 return this.size; in getSize()
/tools/tradefederation/core/tests/src/com/android/tradefed/util/
DSimplePerfStatResultParserTest.java33 Assert.assertTrue(result.size() == 0); in testParseSingleLineWithEmptyString()
39 Assert.assertTrue(result.size() == 0); in testParseSingleLineWithNullString()
45 Assert.assertTrue(result.size() == 0); in testParseSingleLineWithHeaderString()
51 Assert.assertTrue(result.size() == 0); in testParseSingleLineWithReturnString()
57 Assert.assertTrue(result.size() == 0); in testParseSingleLineWithRandomString()
63 Assert.assertTrue(result.size() == 3); in testParseSingleLineWithValidMetricString()
72 Assert.assertTrue(result.size() == 1); in testParseSingleLineWithValidTotalTimeString()
79 Assert.assertTrue(result.size() == 0); in testParseSingleLineWithMultiplePoundString()
85 Assert.assertTrue(result.size() == 0); in testParseSingleLineWithMultipleSpaceString()
/tools/dexter/slicer/
Dwriter.cc68 size_t size = dst - buff; in WriteIntValue() local
69 assert(size > 0 && size <= sizeof(T)); in WriteIntValue()
70 WriteEncodedValueHeader(type, size - 1, data); in WriteIntValue()
71 data.Push(buff, size); in WriteIntValue()
79 size_t size = sizeof(T); in WriteFloatValue() local
82 while (size > 1 && *src == 0) { in WriteFloatValue()
83 --size; in WriteFloatValue()
88 for (size_t i = 0; i < size; ++i) { in WriteFloatValue()
92 assert(size > 0 && size <= sizeof(T)); in WriteFloatValue()
93 WriteEncodedValueHeader(type, size - 1, data); in WriteFloatValue()
[all …]

12345678910>>...15