Home
last modified time | relevance | path

Searched refs:dataSink (Results 1 – 8 of 8) sorted by relevance

/tools/apksig/src/test/java/com/android/apksig/internal/util/
DFileChannelDataSourceTest.java43 ByteArrayDataSink dataSink = new ByteArrayDataSink(); in testFeedsCorrectData_whenFilePartiallyReadFromBeginning() local
46 rafDataSource.feed(0, bytesToFeed, dataSink); in testFeedsCorrectData_whenFilePartiallyReadFromBeginning()
50 byte[] resultBytes = getDataSinkBytes(dataSink); in testFeedsCorrectData_whenFilePartiallyReadFromBeginning()
61 ByteArrayDataSink dataSink = new ByteArrayDataSink(); in testFeedsCorrectData_whenFilePartiallyReadWithOffset() local
65 rafDataSource.feed(offset, bytesToFeed, dataSink); in testFeedsCorrectData_whenFilePartiallyReadWithOffset()
69 byte[] resultBytes = getDataSinkBytes(dataSink); in testFeedsCorrectData_whenFilePartiallyReadWithOffset()
80 ByteArrayDataSink dataSink = new ByteArrayDataSink(); in testFeedsCorrectData_whenSeveralMbRead() local
84 rafDataSource.feed(offset, bytesToFeed, dataSink); in testFeedsCorrectData_whenSeveralMbRead()
88 byte[] resultBytes = getDataSinkBytes(dataSink); in testFeedsCorrectData_whenSeveralMbRead()
93 private byte[] getDataSinkBytes(ByteArrayDataSink dataSink) { in getDataSinkBytes() argument
[all …]
DByteBufferSinkTestBase.java40 protected ByteBuffer getContents(ByteBufferSink dataSink) throws IOException { in getContents() argument
41 ByteBuffer buf = dataSink.getBuffer(); in getContents()
/tools/apksig/src/test/java/com/android/apksig/util/
DDataSinkTestBase.java44 protected abstract ByteBuffer getContents(T dataSink) throws IOException; in getContents() argument
136 private CloseableWithDataSink(T dataSink, Closeable closeable) { in CloseableWithDataSink() argument
137 mDataSink = dataSink; in CloseableWithDataSink()
141 public static <T extends DataSink> CloseableWithDataSink<T> of(T dataSink) { in of() argument
142 return new CloseableWithDataSink<>(dataSink, null); in of()
146 T dataSink, Closeable closeable) { in of() argument
147 return new CloseableWithDataSink<>(dataSink, closeable); in of()
DInMemoryDataSinkTest.java36 protected ByteBuffer getContents(ReadableDataSink dataSink) throws IOException { in getContents() argument
37 if (dataSink.size() > Integer.MAX_VALUE) { in getContents()
38 throw new IOException("Too much data: " + dataSink.size()); in getContents()
40 return dataSink.getByteBuffer(0, (int) dataSink.size()); in getContents()
DDataSinkFromOutputStreamTest.java39 protected ByteBuffer getContents(OutputStreamDataSink dataSink) throws IOException { in getContents() argument
40 return ByteBuffer.wrap(((ByteArrayOutputStream) dataSink.getOutputStream()).toByteArray()); in getContents()
DDataSinkFromRAFTest.java51 protected ByteBuffer getContents(RandomAccessFileDataSink dataSink) throws IOException { in getContents() argument
52 RandomAccessFile f = dataSink.getFile(); in getContents()
/tools/apksig/src/main/java/com/android/apksig/internal/util/
DVerityTreeBuilder.java169 private void digestDataByChunks(DataSource dataSource, DataSink dataSink) throws IOException { in digestDataByChunks() argument
177 dataSink.consume(hash, 0, hash.length); in digestDataByChunks()
189 dataSink.consume(hash, 0, hash.length); in digestDataByChunks()
/tools/apksig/src/main/java/com/android/apksig/
DSigningCertificateLineage.java293 public void writeToDataSink(DataSink dataSink) throws IOException { in writeToDataSink() argument
294 if (dataSink == null) { in writeToDataSink()
297 dataSink.consume(write()); in writeToDataSink()