MCPcopy Create free account
hub / github.com/L-JINBIN/ApkDataMultiplexing / align

Method align

src/bin/mt/apksign/data/DataSources.java:21–28  ·  view source on GitHub ↗
(DataSource source, int align)

Source from the content-addressed store, hash-verified

19 }
20
21 public static DataSource align(DataSource source, int align) {
22 long size = source.size();
23 int overCount = (int) (size % align);
24 if (overCount == 0)
25 return source;
26 int fillCount = align - overCount;
27 return link(source, fromData(new byte[fillCount]));
28 }
29
30 public static DataSource link(DataSource... sources) {
31 return new ChainedDataSource(sources);

Callers

nothing calls this directly

Calls 3

linkMethod · 0.95
fromDataMethod · 0.95
sizeMethod · 0.65

Tested by

no test coverage detected